Show
Ignore:
Timestamp:
03/18/08 02:09:04 (20 months ago)
Author:
eevee
Message:

Converted all tables to UTF-8, hopefully fixing the little shoutbox problem. (#287, kinda #58)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/script/base.sql

    r406 r420  
    1515 
    1616DROP TABLE IF EXISTS edits; 
     17SET @saved_cs_client     = @@character_set_client; 
     18SET character_set_client = utf8; 
    1719CREATE TABLE edits ( 
    1820  id int(10) unsigned NOT NULL auto_increment, 
     
    2022  user_id int(10) unsigned NOT NULL default '0', 
    2123  `time` int(10) unsigned NOT NULL default '0', 
    22   old_content text NOT NULL, 
     24  old_content mediumtext NOT NULL, 
    2325  PRIMARY KEY  (id), 
    2426  KEY POSTID USING BTREE (post_id) 
    25 ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
     27) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
     28SET character_set_client = @saved_cs_client; 
    2629 
    2730-- 
     
    3033 
    3134DROP TABLE IF EXISTS error_log; 
     35SET @saved_cs_client     = @@character_set_client; 
     36SET character_set_client = utf8; 
    3237CREATE TABLE error_log ( 
    3338  id int(10) unsigned NOT NULL auto_increment, 
     
    4146  PRIMARY KEY  (id) 
    4247) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
     48SET character_set_client = @saved_cs_client; 
    4349 
    4450-- 
     
    4753 
    4854DROP TABLE IF EXISTS forums; 
     55SET @saved_cs_client     = @@character_set_client; 
     56SET character_set_client = utf8; 
    4957CREATE TABLE forums ( 
    5058  id int(10) unsigned NOT NULL auto_increment, 
     
    5765  description varchar(255) NOT NULL, 
    5866  PRIMARY KEY  (id) 
    59 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC; 
     67) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; 
     68SET character_set_client = @saved_cs_client; 
    6069 
    6170-- 
     
    6473 
    6574DROP TABLE IF EXISTS group_permissions; 
     75SET @saved_cs_client     = @@character_set_client; 
     76SET character_set_client = utf8; 
    6677CREATE TABLE group_permissions ( 
    6778  group_id int(10) unsigned NOT NULL default '0', 
     
    7081  polarity enum('allow','deny') default NULL, 
    7182  PRIMARY KEY  USING BTREE (group_id,permission,scope) 
    72 ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
     83) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
     84SET character_set_client = @saved_cs_client; 
    7385 
    7486-- 
     
    7789 
    7890DROP TABLE IF EXISTS groups; 
     91SET @saved_cs_client     = @@character_set_client; 
     92SET character_set_client = utf8; 
    7993CREATE TABLE groups ( 
    8094  id int(10) unsigned NOT NULL auto_increment, 
     
    8397  UNIQUE KEY id (id) 
    8498) ENGINE=InnoDB DEFAULT CHARSET=utf8; 
     99SET character_set_client = @saved_cs_client; 
    85100 
    86101-- 
     
    89104 
    90105DROP TABLE IF EXISTS messages; 
     106SET @saved_cs_client     = @@character_set_client; 
     107SET character_set_client = utf8; 
    91108CREATE TABLE messages ( 
    92109  id int(10) unsigned NOT NULL auto_increment, 
     
    95112  `time` int(10) unsigned NOT NULL default '0', 
    96113  `subject` tinytext NOT NULL, 
    97   message text NOT NULL, 
    98   PRIMARY KEY  (id) 
    99 ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
     114  message mediumtext NOT NULL, 
     115  PRIMARY KEY  (id) 
     116) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
     117SET character_set_client = @saved_cs_client; 
    100118 
    101119-- 
     
    104122 
    105123DROP TABLE IF EXISTS posts; 
     124SET @saved_cs_client     = @@character_set_client; 
     125SET character_set_client = utf8; 
    106126CREATE TABLE posts ( 
    107127  id int(10) unsigned NOT NULL auto_increment, 
     
    111131  `time` int(10) unsigned NOT NULL default '0', 
    112132  format enum('bbcode','raw','html') NOT NULL default 'raw', 
    113   content text NOT NULL, 
     133  content mediumtext NOT NULL, 
    114134  last_edit_id int(10) unsigned NOT NULL default '0', 
    115135  PRIMARY KEY  (id), 
    116136  KEY THREAD USING BTREE (thread_id), 
    117137  KEY `USER` USING BTREE (user_id) 
    118 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED; 
     138) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED; 
     139SET character_set_client = @saved_cs_client; 
    119140 
    120141-- 
     
    123144 
    124145DROP TABLE IF EXISTS sessions; 
     146SET @saved_cs_client     = @@character_set_client; 
     147SET character_set_client = utf8; 
    125148CREATE TABLE sessions ( 
    126149  id varchar(72) NOT NULL default '', 
    127150  user_id int(10) unsigned NOT NULL default '0', 
    128151  time_expires int(10) unsigned default NULL, 
    129   `data` text, 
     152  `data` mediumtext, 
    130153  PRIMARY KEY  USING BTREE (id), 
    131154  KEY USER_ID USING BTREE (user_id) 
    132 ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
     155) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
     156SET character_set_client = @saved_cs_client; 
    133157 
    134158-- 
     
    137161 
    138162DROP TABLE IF EXISTS shoutbox; 
     163SET @saved_cs_client     = @@character_set_client; 
     164SET character_set_client = utf8; 
    139165CREATE TABLE shoutbox ( 
    140166  id int(10) unsigned NOT NULL auto_increment, 
     
    143169  ip int(10) unsigned NOT NULL default '0', 
    144170  `time` int(10) unsigned NOT NULL default '0', 
    145   content text NOT NULL, 
    146   PRIMARY KEY  (id) 
    147 ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
     171  content mediumtext NOT NULL, 
     172  PRIMARY KEY  (id) 
     173) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
     174SET character_set_client = @saved_cs_client; 
    148175 
    149176-- 
     
    152179 
    153180DROP TABLE IF EXISTS threads; 
     181SET @saved_cs_client     = @@character_set_client; 
     182SET character_set_client = utf8; 
    154183CREATE TABLE threads ( 
    155184  id int(10) unsigned NOT NULL auto_increment, 
     
    165194  PRIMARY KEY  (id), 
    166195  KEY FORUMID USING BTREE (forum_id) 
    167 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC; 
     196) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; 
     197SET character_set_client = @saved_cs_client; 
    168198 
    169199-- 
     
    172202 
    173203DROP TABLE IF EXISTS thread_views; 
     204SET @saved_cs_client     = @@character_set_client; 
     205SET character_set_client = utf8; 
    174206CREATE TABLE thread_views ( 
    175207  thread_id int(10) unsigned NOT NULL, 
     
    178210  PRIMARY KEY  (thread_id,user_id) 
    179211) ENGINE=InnoDB DEFAULT CHARSET=utf8; 
     212SET character_set_client = @saved_cs_client; 
    180213 
    181214-- 
     
    184217 
    185218DROP TABLE IF EXISTS user_groups; 
     219SET @saved_cs_client     = @@character_set_client; 
     220SET character_set_client = utf8; 
    186221CREATE TABLE user_groups ( 
    187222  user_id int(10) unsigned NOT NULL default '0', 
     
    191226  KEY user_id USING BTREE (user_id), 
    192227  KEY group_id USING BTREE (group_id) 
    193 ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
     228) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
     229SET character_set_client = @saved_cs_client; 
    194230 
    195231-- 
     
    198234 
    199235DROP TABLE IF EXISTS users; 
     236SET @saved_cs_client     = @@character_set_client; 
     237SET character_set_client = utf8; 
    200238CREATE TABLE users ( 
    201239  id int(10) unsigned NOT NULL auto_increment, 
     
    218256  pm_icon enum('bead','bellossom','dream','duskull','eatmail','gorgeous','letter','magnemite','pika','retro','slakoth','vee','wailmer','wingull','zigzagoon') NOT NULL default 'letter', 
    219257  custom_title varchar(32) NOT NULL, 
    220   signature text NOT NULL, 
     258  signature mediumtext NOT NULL, 
    221259  is_dumb tinyint(1) NOT NULL default '0', 
    222260  PRIMARY KEY  (id), 
    223261  UNIQUE KEY `NAME` (`name`) 
    224 ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
     262) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
     263SET character_set_client = @saved_cs_client; 
    225264/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 
    226265