3 -- Host: Database: so2-dev
4 -- ------------------------------------------------------
5 -- Server version 5.0.10-beta
7 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10 /*!40101 SET NAMES utf8 */;
11 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
12 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
13 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
14 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17 -- Table structure for table `board-groups`
20 DROP TABLE IF EXISTS `board-groups`;
21 CREATE TABLE `board-groups` (
22 `groupid` tinyint(3) unsigned NOT NULL auto_increment,
23 `group_name` varchar(50) character set latin1 NOT NULL,
24 PRIMARY KEY (`groupid`)
25 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
28 -- Table structure for table `boards`
31 DROP TABLE IF EXISTS `boards`;
32 CREATE TABLE `boards` (
33 `boardid` tinyint(4) NOT NULL auto_increment,
34 `groupid` tinyint(3) unsigned NOT NULL default '0',
35 `board_name` varchar(255) NOT NULL,
36 `caption` varchar(255) NOT NULL,
37 `view_level` tinyint(3) unsigned NOT NULL default '0',
38 `topic_level` tinyint(3) unsigned NOT NULL default '0',
39 `post_level` tinyint(3) unsigned NOT NULL default '0',
40 PRIMARY KEY (`boardid`)
41 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
44 -- Table structure for table `invites`
47 DROP TABLE IF EXISTS `invites`;
48 CREATE TABLE `invites` (
49 `id` smallint(5) unsigned NOT NULL auto_increment,
50 `userid` smallint(5) unsigned NOT NULL,
51 `code` char(36) NOT NULL,
53 KEY `userid` (`userid`)
54 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
57 -- Table structure for table `marks`
60 DROP TABLE IF EXISTS `marks`;
61 CREATE TABLE `marks` (
62 `markid` tinyint(3) unsigned NOT NULL auto_increment,
63 `messageid` mediumint(8) unsigned NOT NULL default '0',
64 `mark_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
65 `reason` char(255) NOT NULL,
66 `handled` bit(1) NOT NULL,
67 PRIMARY KEY (`markid`),
68 KEY `mk_msgid` (`messageid`)
69 ) ENGINE=MEMORY DEFAULT CHARSET=utf8;
72 -- Table structure for table `message-data`
75 DROP TABLE IF EXISTS `message-data`;
76 CREATE TABLE `message-data` (
77 `messageid` mediumint(8) unsigned NOT NULL default '0',
78 `mtext` text NOT NULL,
79 PRIMARY KEY (`messageid`),
80 CONSTRAINT `message-data_ibfk_1` FOREIGN KEY (`messageid`) REFERENCES `messages` (`messageid`) ON DELETE CASCADE
81 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
84 -- Table structure for table `messages`
87 DROP TABLE IF EXISTS `messages`;
88 CREATE TABLE `messages` (
89 `messageid` mediumint(8) unsigned NOT NULL auto_increment,
90 `topicid` mediumint(8) unsigned NOT NULL default '0',
91 `userid` smallint(5) unsigned NOT NULL default '0',
92 `mtime` int(10) unsigned NOT NULL,
93 `score` tinyint(3) NOT NULL default '0',
94 `replyto` mediumint(8) unsigned default NULL,
95 `origin_ip` int(10) unsigned NOT NULL,
96 PRIMARY KEY (`messageid`),
97 KEY `m_replyto` (`replyto`),
98 KEY `m_poster` (`userid`),
99 KEY `m_topic` (`topicid`)
100 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
103 -- Table structure for table `themes`
106 DROP TABLE IF EXISTS `themes`;
107 CREATE TABLE `themes` (
108 `themeid` tinyint(3) unsigned NOT NULL auto_increment,
109 `theme_name` char(20) NOT NULL,
110 `css_file` char(20) NOT NULL,
111 PRIMARY KEY (`themeid`)
112 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED;
115 -- Table structure for table `topics`
118 DROP TABLE IF EXISTS `topics`;
119 CREATE TABLE `topics` (
120 `topicid` mediumint(8) unsigned NOT NULL auto_increment,
121 `topic_title` varchar(255) NOT NULL,
122 `userid` smallint(5) unsigned NOT NULL default '0',
123 `boardid` tinyint(4) NOT NULL default '0',
124 `visibility` enum('normal','deleted','modded','sticky') NOT NULL default 'normal',
125 `closed` bit(1) NOT NULL,
126 PRIMARY KEY (`topicid`),
127 KEY `t_poster` (`userid`)
128 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
131 -- Table structure for table `users`
134 DROP TABLE IF EXISTS `users`;
135 CREATE TABLE `users` (
136 `userid` smallint(5) unsigned NOT NULL auto_increment,
137 `level` tinyint(3) NOT NULL default '10',
138 `alias` varchar(25) NOT NULL,
139 `password` binary(255) NOT NULL,
140 `points` int(10) unsigned NOT NULL default '0',
141 `referrer` smallint(5) unsigned default NULL,
142 `boardlist_layout` tinyint(1) unsigned NOT NULL default '0',
143 `topiclist_layout` tinyint(1) unsigned NOT NULL default '0',
144 `msglist_layout` tinyint(1) unsigned NOT NULL default '0',
145 `topics_page` tinyint(3) unsigned NOT NULL default '35',
146 `msgs_page` tinyint(3) unsigned NOT NULL default '35',
147 `language` varchar(32) NOT NULL default 'en_GB',
148 `timezone` tinyint(2) NOT NULL default '0',
149 `theme` tinyint(3) unsigned NOT NULL default '4',
150 `last_active_date` int(10) unsigned NOT NULL,
151 `register_date` int(10) unsigned NOT NULL,
152 `sig` varchar(255) NOT NULL,
153 `quote` varchar(255) NOT NULL,
154 `useragent` varchar(100) NOT NULL,
155 `public_email` varchar(70) NOT NULL,
156 `private_email` varchar(70) NOT NULL,
157 `reg_email` varchar(70) NOT NULL,
158 `last_ip` int(10) unsigned default '0',
159 `last_login_ip` int(10) unsigned default '0',
160 `reg_ip` int(10) unsigned default '0',
161 `date_format` varchar(40) NOT NULL default 'Y-m-d H:i:s',
162 PRIMARY KEY (`userid`),
163 KEY `u_referrer` (`referrer`)
164 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
166 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
167 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
168 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
169 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
170 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
171 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
172 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;