| 1 | ; |
|---|
| 2 | ; |
|---|
| 3 | ; |
|---|
| 4 | ; |
|---|
| 5 | ; |
|---|
| 6 | ; |
|---|
| 7 | ; |
|---|
| 8 | ; |
|---|
| 9 | ; |
|---|
| 10 | ; |
|---|
| 11 | |
|---|
| 12 | -- |
|---|
| 13 | -- Table structure for table `edits` |
|---|
| 14 | -- |
|---|
| 15 | |
|---|
| 16 | DROP TABLE IF EXISTS edits; |
|---|
| 17 | SET @saved_cs_client = @@character_set_client; |
|---|
| 18 | SET character_set_client = utf8; |
|---|
| 19 | CREATE TABLE edits ( |
|---|
| 20 | id int(10) unsigned NOT NULL auto_increment, |
|---|
| 21 | post_id int(10) unsigned NOT NULL default '0', |
|---|
| 22 | user_id int(10) unsigned NOT NULL default '0', |
|---|
| 23 | `time` int(10) unsigned NOT NULL default '0', |
|---|
| 24 | old_content mediumtext NOT NULL, |
|---|
| 25 | PRIMARY KEY (id), |
|---|
| 26 | KEY POSTID USING BTREE (post_id) |
|---|
| 27 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|---|
| 28 | SET character_set_client = @saved_cs_client; |
|---|
| 29 | |
|---|
| 30 | -- |
|---|
| 31 | -- Table structure for table `error_log` |
|---|
| 32 | -- |
|---|
| 33 | |
|---|
| 34 | DROP TABLE IF EXISTS error_log; |
|---|
| 35 | SET @saved_cs_client = @@character_set_client; |
|---|
| 36 | SET character_set_client = utf8; |
|---|
| 37 | CREATE TABLE error_log ( |
|---|
| 38 | id int(10) unsigned NOT NULL auto_increment, |
|---|
| 39 | `time` int(10) unsigned NOT NULL default '0', |
|---|
| 40 | user_id int(10) unsigned NOT NULL default '0', |
|---|
| 41 | ip int(10) unsigned NOT NULL default '0', |
|---|
| 42 | path tinytext NOT NULL, |
|---|
| 43 | method enum('POST','GET') default NULL, |
|---|
| 44 | `query` text NOT NULL, |
|---|
| 45 | error text NOT NULL, |
|---|
| 46 | PRIMARY KEY (id) |
|---|
| 47 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|---|
| 48 | SET character_set_client = @saved_cs_client; |
|---|
| 49 | |
|---|
| 50 | -- |
|---|
| 51 | -- Table structure for table `forums` |
|---|
| 52 | -- |
|---|
| 53 | |
|---|
| 54 | DROP TABLE IF EXISTS forums; |
|---|
| 55 | SET @saved_cs_client = @@character_set_client; |
|---|
| 56 | SET character_set_client = utf8; |
|---|
| 57 | CREATE TABLE forums ( |
|---|
| 58 | id int(10) unsigned NOT NULL auto_increment, |
|---|
| 59 | `name` varchar(80) NOT NULL default 'Untitled Forum', |
|---|
| 60 | last_post_id int(10) unsigned default NULL, |
|---|
| 61 | thread_count int(10) unsigned NOT NULL default '0', |
|---|
| 62 | post_count int(10) unsigned NOT NULL default '0', |
|---|
| 63 | flags set('header') NOT NULL, |
|---|
| 64 | accessibility enum('normal','locked','archive','hidden') NOT NULL default 'normal', |
|---|
| 65 | description varchar(255) NOT NULL, |
|---|
| 66 | PRIMARY KEY (id) |
|---|
| 67 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; |
|---|
| 68 | SET character_set_client = @saved_cs_client; |
|---|
| 69 | |
|---|
| 70 | -- |
|---|
| 71 | -- Table structure for table `group_permissions` |
|---|
| 72 | -- |
|---|
| 73 | |
|---|
| 74 | DROP TABLE IF EXISTS group_permissions; |
|---|
| 75 | SET @saved_cs_client = @@character_set_client; |
|---|
| 76 | SET character_set_client = utf8; |
|---|
| 77 | CREATE TABLE group_permissions ( |
|---|
| 78 | group_id int(10) unsigned NOT NULL default '0', |
|---|
| 79 | permission varchar(64) NOT NULL default '', |
|---|
| 80 | scope varchar(64) NOT NULL default '', |
|---|
| 81 | polarity enum('allow','deny') default NULL, |
|---|
| 82 | PRIMARY KEY USING BTREE (group_id,permission,scope) |
|---|
| 83 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|---|
| 84 | SET character_set_client = @saved_cs_client; |
|---|
| 85 | |
|---|
| 86 | -- |
|---|
| 87 | -- Table structure for table `groups` |
|---|
| 88 | -- |
|---|
| 89 | |
|---|
| 90 | DROP TABLE IF EXISTS groups; |
|---|
| 91 | SET @saved_cs_client = @@character_set_client; |
|---|
| 92 | SET character_set_client = utf8; |
|---|
| 93 | CREATE TABLE groups ( |
|---|
| 94 | id int(10) unsigned NOT NULL auto_increment, |
|---|
| 95 | icon tinytext NOT NULL, |
|---|
| 96 | `name` tinytext NOT NULL, |
|---|
| 97 | UNIQUE KEY id (id) |
|---|
| 98 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|---|
| 99 | SET character_set_client = @saved_cs_client; |
|---|
| 100 | |
|---|
| 101 | -- |
|---|
| 102 | -- Table structure for table `messages` |
|---|
| 103 | -- |
|---|
| 104 | |
|---|
| 105 | DROP TABLE IF EXISTS messages; |
|---|
| 106 | SET @saved_cs_client = @@character_set_client; |
|---|
| 107 | SET character_set_client = utf8; |
|---|
| 108 | CREATE TABLE messages ( |
|---|
| 109 | id int(10) unsigned NOT NULL auto_increment, |
|---|
| 110 | from_user_id int(10) unsigned NOT NULL default '0', |
|---|
| 111 | to_user_id int(10) unsigned NOT NULL default '0', |
|---|
| 112 | `time` int(10) unsigned NOT NULL default '0', |
|---|
| 113 | `subject` tinytext NOT NULL, |
|---|
| 114 | message mediumtext NOT NULL, |
|---|
| 115 | PRIMARY KEY (id) |
|---|
| 116 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|---|
| 117 | SET character_set_client = @saved_cs_client; |
|---|
| 118 | |
|---|
| 119 | -- |
|---|
| 120 | -- Table structure for table `posts` |
|---|
| 121 | -- |
|---|
| 122 | |
|---|
| 123 | DROP TABLE IF EXISTS posts; |
|---|
| 124 | SET @saved_cs_client = @@character_set_client; |
|---|
| 125 | SET character_set_client = utf8; |
|---|
| 126 | CREATE TABLE posts ( |
|---|
| 127 | id int(10) unsigned NOT NULL auto_increment, |
|---|
| 128 | thread_id int(10) unsigned NOT NULL default '0', |
|---|
| 129 | user_id int(10) unsigned NOT NULL default '0', |
|---|
| 130 | flags set('deleted') NOT NULL default '', |
|---|
| 131 | `time` int(10) unsigned NOT NULL default '0', |
|---|
| 132 | format enum('bbcode','raw','html') NOT NULL default 'raw', |
|---|
| 133 | content mediumtext NOT NULL, |
|---|
| 134 | last_edit_id int(10) unsigned NOT NULL default '0', |
|---|
| 135 | PRIMARY KEY (id), |
|---|
| 136 | KEY THREAD USING BTREE (thread_id), |
|---|
| 137 | KEY `USER` USING BTREE (user_id) |
|---|
| 138 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED; |
|---|
| 139 | SET character_set_client = @saved_cs_client; |
|---|
| 140 | |
|---|
| 141 | -- |
|---|
| 142 | -- Table structure for table `sessions` |
|---|
| 143 | -- |
|---|
| 144 | |
|---|
| 145 | DROP TABLE IF EXISTS sessions; |
|---|
| 146 | SET @saved_cs_client = @@character_set_client; |
|---|
| 147 | SET character_set_client = utf8; |
|---|
| 148 | CREATE TABLE sessions ( |
|---|
| 149 | id varchar(72) NOT NULL default '', |
|---|
| 150 | user_id int(10) unsigned NOT NULL default '0', |
|---|
| 151 | time_expires int(10) unsigned default NULL, |
|---|
| 152 | `data` mediumtext, |
|---|
| 153 | PRIMARY KEY USING BTREE (id), |
|---|
| 154 | KEY USER_ID USING BTREE (user_id) |
|---|
| 155 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|---|
| 156 | SET character_set_client = @saved_cs_client; |
|---|
| 157 | |
|---|
| 158 | -- |
|---|
| 159 | -- Table structure for table `shoutbox` |
|---|
| 160 | -- |
|---|
| 161 | |
|---|
| 162 | DROP TABLE IF EXISTS shoutbox; |
|---|
| 163 | SET @saved_cs_client = @@character_set_client; |
|---|
| 164 | SET character_set_client = utf8; |
|---|
| 165 | CREATE TABLE shoutbox ( |
|---|
| 166 | id int(10) unsigned NOT NULL auto_increment, |
|---|
| 167 | `name` varchar(24) NOT NULL default 'Anonymous', |
|---|
| 168 | user_id int(10) unsigned default NULL, |
|---|
| 169 | ip int(10) unsigned NOT NULL default '0', |
|---|
| 170 | `time` int(10) unsigned NOT NULL default '0', |
|---|
| 171 | content mediumtext NOT NULL, |
|---|
| 172 | PRIMARY KEY (id) |
|---|
| 173 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|---|
| 174 | SET character_set_client = @saved_cs_client; |
|---|
| 175 | |
|---|
| 176 | -- |
|---|
| 177 | -- Table structure for table `threads` |
|---|
| 178 | -- |
|---|
| 179 | |
|---|
| 180 | DROP TABLE IF EXISTS threads; |
|---|
| 181 | SET @saved_cs_client = @@character_set_client; |
|---|
| 182 | SET character_set_client = utf8; |
|---|
| 183 | CREATE TABLE threads ( |
|---|
| 184 | id int(10) unsigned NOT NULL auto_increment, |
|---|
| 185 | forum_id int(10) unsigned NOT NULL default '0', |
|---|
| 186 | `subject` varchar(48) NOT NULL default 'Untitled Thread', |
|---|
| 187 | blurb varchar(96) NOT NULL default '', |
|---|
| 188 | first_post_id int(10) unsigned NOT NULL, |
|---|
| 189 | last_post_id int(10) unsigned NOT NULL, |
|---|
| 190 | last_post_time int(10) unsigned NOT NULL default '0', |
|---|
| 191 | post_count int(10) unsigned NOT NULL default '0', |
|---|
| 192 | view_count int(10) unsigned NOT NULL default '0', |
|---|
| 193 | flags set('locked','sticky','announcement','deleted') NOT NULL default '', |
|---|
| 194 | PRIMARY KEY (id), |
|---|
| 195 | KEY FORUMID USING BTREE (forum_id) |
|---|
| 196 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; |
|---|
| 197 | SET character_set_client = @saved_cs_client; |
|---|
| 198 | |
|---|
| 199 | -- |
|---|
| 200 | -- Table structure for table `thread_views` |
|---|
| 201 | -- |
|---|
| 202 | |
|---|
| 203 | DROP TABLE IF EXISTS thread_views; |
|---|
| 204 | SET @saved_cs_client = @@character_set_client; |
|---|
| 205 | SET character_set_client = utf8; |
|---|
| 206 | CREATE TABLE thread_views ( |
|---|
| 207 | thread_id int(10) unsigned NOT NULL, |
|---|
| 208 | user_id int(10) unsigned NOT NULL, |
|---|
| 209 | last_viewed int(10) unsigned NOT NULL, |
|---|
| 210 | PRIMARY KEY (thread_id,user_id) |
|---|
| 211 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|---|
| 212 | SET character_set_client = @saved_cs_client; |
|---|
| 213 | |
|---|
| 214 | -- |
|---|
| 215 | -- Table structure for table `user_groups` |
|---|
| 216 | -- |
|---|
| 217 | |
|---|
| 218 | DROP TABLE IF EXISTS user_groups; |
|---|
| 219 | SET @saved_cs_client = @@character_set_client; |
|---|
| 220 | SET character_set_client = utf8; |
|---|
| 221 | CREATE TABLE user_groups ( |
|---|
| 222 | user_id int(10) unsigned NOT NULL default '0', |
|---|
| 223 | group_id tinyint(3) unsigned NOT NULL default '0', |
|---|
| 224 | priority tinyint(3) unsigned NOT NULL default '0', |
|---|
| 225 | PRIMARY KEY USING BTREE (user_id,group_id,priority), |
|---|
| 226 | KEY user_id USING BTREE (user_id), |
|---|
| 227 | KEY group_id USING BTREE (group_id) |
|---|
| 228 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|---|
| 229 | SET character_set_client = @saved_cs_client; |
|---|
| 230 | |
|---|
| 231 | -- |
|---|
| 232 | -- Table structure for table `users` |
|---|
| 233 | -- |
|---|
| 234 | |
|---|
| 235 | DROP TABLE IF EXISTS users; |
|---|
| 236 | SET @saved_cs_client = @@character_set_client; |
|---|
| 237 | SET character_set_client = utf8; |
|---|
| 238 | CREATE TABLE users ( |
|---|
| 239 | id int(10) unsigned NOT NULL auto_increment, |
|---|
| 240 | `name` varchar(20) NOT NULL default '', |
|---|
| 241 | `password` varchar(40) NOT NULL, |
|---|
| 242 | time_joined int(10) unsigned NOT NULL default '0', |
|---|
| 243 | time_active int(10) unsigned NOT NULL default '0', |
|---|
| 244 | thread_view_cutoff int(10) unsigned NOT NULL, |
|---|
| 245 | post_count int(10) unsigned NOT NULL default '0', |
|---|
| 246 | flags set('lockedsig','lockedavatar','lockedtitle') NOT NULL default '', |
|---|
| 247 | news_pic varchar(64) default NULL, |
|---|
| 248 | avatar varchar(64) default NULL, |
|---|
| 249 | contact_aim varchar(32) NOT NULL default '', |
|---|
| 250 | contact_icq varchar(32) NOT NULL default '', |
|---|
| 251 | contact_msn varchar(32) NOT NULL default '', |
|---|
| 252 | contact_yim varchar(32) NOT NULL default '', |
|---|
| 253 | contact_lj varchar(32) NOT NULL default '', |
|---|
| 254 | contact_homepage varchar(96) NOT NULL default '', |
|---|
| 255 | contact_email varchar(32) NOT NULL default '', |
|---|
| 256 | pm_icon enum('bead','bellossom','dream','duskull','eatmail','gorgeous','letter','magnemite','pika','retro','slakoth','vee','wailmer','wingull','zigzagoon') NOT NULL default 'letter', |
|---|
| 257 | custom_title varchar(32) NOT NULL, |
|---|
| 258 | signature mediumtext NOT NULL, |
|---|
| 259 | is_dumb tinyint(1) NOT NULL default '0', |
|---|
| 260 | PRIMARY KEY (id), |
|---|
| 261 | UNIQUE KEY `NAME` (`name`) |
|---|
| 262 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|---|
| 263 | SET character_set_client = @saved_cs_client; |
|---|
| 264 | ; |
|---|
| 265 | |
|---|
| 266 | ; |
|---|
| 267 | ; |
|---|
| 268 | ; |
|---|
| 269 | ; |
|---|
| 270 | ; |
|---|
| 271 | ; |
|---|
| 272 | ; |
|---|