66 protected tinyint(1) NOT NULL DEFAULT 0, |
66 protected tinyint(1) NOT NULL DEFAULT 0, |
67 wiki_mode tinyint(1) NOT NULL DEFAULT 2, |
67 wiki_mode tinyint(1) NOT NULL DEFAULT 2, |
68 delvotes int(10) NOT NULL default 0, |
68 delvotes int(10) NOT NULL default 0, |
69 password varchar(40) NOT NULL DEFAULT '', |
69 password varchar(40) NOT NULL DEFAULT '', |
70 delvote_ips text NOT NULL |
70 delvote_ips text NOT NULL |
71 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
71 ) CHARACTER SET `utf8`; |
72 |
72 |
73 CREATE TABLE {{TABLE_PREFIX}}session_keys( |
73 CREATE TABLE {{TABLE_PREFIX}}session_keys( |
74 session_key varchar(32), |
74 session_key varchar(32), |
75 salt varchar(32), |
75 salt varchar(32), |
76 user_id mediumint(8), |
76 user_id mediumint(8), |
77 auth_level tinyint(1) NOT NULL default '0', |
77 auth_level tinyint(1) NOT NULL default '0', |
78 source_ip varchar(10) default '0x7f000001', |
78 source_ip varchar(10) default '0x7f000001', |
79 time bigint(15) default '0' |
79 time bigint(15) default '0' |
80 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
80 ) CHARACTER SET `utf8`; |
81 |
81 |
82 CREATE TABLE {{TABLE_PREFIX}}themes( |
82 CREATE TABLE {{TABLE_PREFIX}}themes( |
83 theme_id varchar(63), |
83 theme_id varchar(63), |
84 theme_name text, |
84 theme_name text, |
85 theme_order smallint(5) NOT NULL default '1', |
85 theme_order smallint(5) NOT NULL default '1', |
86 default_style varchar(63) NOT NULL DEFAULT '', |
86 default_style varchar(63) NOT NULL DEFAULT '', |
87 enabled tinyint(1) NOT NULL default '1' |
87 enabled tinyint(1) NOT NULL default '1' |
88 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
88 ) CHARACTER SET `utf8`; |
89 |
89 |
90 CREATE TABLE {{TABLE_PREFIX}}users( |
90 CREATE TABLE {{TABLE_PREFIX}}users( |
91 user_id mediumint(8) NOT NULL auto_increment, |
91 user_id mediumint(8) NOT NULL auto_increment, |
92 username text, |
92 username text, |
93 password varchar(255), |
93 password varchar(255), |
138 size bigint(15) NOT NULL, |
138 size bigint(15) NOT NULL, |
139 mimetype varchar(63) default NULL, |
139 mimetype varchar(63) default NULL, |
140 file_extension varchar(8) default NULL, |
140 file_extension varchar(8) default NULL, |
141 file_key varchar(32) NOT NULL, |
141 file_key varchar(32) NOT NULL, |
142 PRIMARY KEY (file_id) |
142 PRIMARY KEY (file_id) |
143 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
143 ) CHARACTER SET `utf8`; |
144 |
144 |
145 CREATE TABLE {{TABLE_PREFIX}}buddies( |
145 CREATE TABLE {{TABLE_PREFIX}}buddies( |
146 buddy_id int(15) NOT NULL auto_increment, |
146 buddy_id int(15) NOT NULL auto_increment, |
147 user_id mediumint(8), |
147 user_id mediumint(8), |
148 buddy_user_id mediumint(8), |
148 buddy_user_id mediumint(8), |
149 is_friend tinyint(1) NOT NULL default '1', |
149 is_friend tinyint(1) NOT NULL default '1', |
150 PRIMARY KEY (buddy_id) |
150 PRIMARY KEY (buddy_id) |
151 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
151 ) CHARACTER SET `utf8`; |
152 |
152 |
153 CREATE TABLE {{TABLE_PREFIX}}privmsgs( |
153 CREATE TABLE {{TABLE_PREFIX}}privmsgs( |
154 message_id int(15) NOT NULL auto_increment, |
154 message_id int(15) NOT NULL auto_increment, |
155 message_from varchar(63), |
155 message_from varchar(63), |
156 message_to varchar(255), |
156 message_to varchar(255), |
158 subject varchar(63), |
158 subject varchar(63), |
159 message_text text, |
159 message_text text, |
160 folder_name varchar(63), |
160 folder_name varchar(63), |
161 message_read tinyint(1) NOT NULL DEFAULT 0, |
161 message_read tinyint(1) NOT NULL DEFAULT 0, |
162 PRIMARY KEY (message_id) |
162 PRIMARY KEY (message_id) |
163 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
163 ) CHARACTER SET `utf8`; |
164 |
164 |
165 CREATE TABLE {{TABLE_PREFIX}}sidebar( |
165 CREATE TABLE {{TABLE_PREFIX}}sidebar( |
166 item_id smallint(3) NOT NULL auto_increment, |
166 item_id smallint(3) NOT NULL auto_increment, |
167 item_order smallint(3) NOT NULL DEFAULT 0, |
167 item_order smallint(3) NOT NULL DEFAULT 0, |
168 item_enabled tinyint(1) NOT NULL DEFAULT 1, |
168 item_enabled tinyint(1) NOT NULL DEFAULT 1, |
169 sidebar_id smallint(3) NOT NULL DEFAULT 1, |
169 sidebar_id smallint(3) NOT NULL DEFAULT 1, |
170 block_name varchar(63) NOT NULL, |
170 block_name varchar(63) NOT NULL, |
171 block_type tinyint(1) NOT NULL DEFAULT 0, |
171 block_type tinyint(1) NOT NULL DEFAULT 0, |
172 block_content text, |
172 block_content text, |
173 PRIMARY KEY ( item_id ) |
173 PRIMARY KEY ( item_id ) |
174 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
174 ) CHARACTER SET `utf8`; |
175 |
175 |
176 CREATE TABLE {{TABLE_PREFIX}}hits( |
176 CREATE TABLE {{TABLE_PREFIX}}hits( |
177 hit_id bigint(20) NOT NULL auto_increment, |
177 hit_id bigint(20) NOT NULL auto_increment, |
178 username varchar(63) NOT NULL, |
178 username varchar(63) NOT NULL, |
179 time int(12) NOT NULL DEFAULT 0, |
179 time int(12) NOT NULL DEFAULT 0, |
180 page_id varchar(63), |
180 page_id varchar(63), |
181 namespace varchar(63), |
181 namespace varchar(63), |
182 PRIMARY KEY ( hit_id ) |
182 PRIMARY KEY ( hit_id ) |
183 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
183 ) CHARACTER SET `utf8`; |
184 |
184 |
185 CREATE TABLE {{TABLE_PREFIX}}search_index( |
185 CREATE TABLE {{TABLE_PREFIX}}search_index( |
186 word varbinary(64) NOT NULL, |
186 word varbinary(64) NOT NULL, |
187 page_names text, |
187 page_names text, |
188 PRIMARY KEY ( word ) |
188 PRIMARY KEY ( word ) |
189 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
189 ) CHARACTER SET `utf8`; |
190 |
190 |
191 CREATE TABLE {{TABLE_PREFIX}}groups( |
191 CREATE TABLE {{TABLE_PREFIX}}groups( |
192 group_id mediumint(5) UNSIGNED NOT NULL auto_increment, |
192 group_id mediumint(5) UNSIGNED NOT NULL auto_increment, |
193 group_name varchar(64), |
193 group_name varchar(64), |
194 group_type tinyint(1) NOT NULL DEFAULT 1, |
194 group_type tinyint(1) NOT NULL DEFAULT 1, |
195 PRIMARY KEY ( group_id ), |
195 PRIMARY KEY ( group_id ), |
196 system_group tinyint(1) NOT NULL DEFAULT 0 |
196 system_group tinyint(1) NOT NULL DEFAULT 0 |
197 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
197 ) CHARACTER SET `utf8`; |
198 |
198 |
199 CREATE TABLE {{TABLE_PREFIX}}group_members( |
199 CREATE TABLE {{TABLE_PREFIX}}group_members( |
200 member_id int(12) UNSIGNED NOT NULL auto_increment, |
200 member_id int(12) UNSIGNED NOT NULL auto_increment, |
201 group_id mediumint(5) UNSIGNED NOT NULL, |
201 group_id mediumint(5) UNSIGNED NOT NULL, |
202 user_id int(12) NOT NULL, |
202 user_id int(12) NOT NULL, |
203 is_mod tinyint(1) NOT NULL DEFAULT 0, |
203 is_mod tinyint(1) NOT NULL DEFAULT 0, |
204 pending tinyint(1) NOT NULL DEFAULT 0, |
204 pending tinyint(1) NOT NULL DEFAULT 0, |
205 PRIMARY KEY ( member_id ) |
205 PRIMARY KEY ( member_id ) |
206 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
206 ) CHARACTER SET `utf8`; |
207 |
207 |
208 CREATE TABLE {{TABLE_PREFIX}}acl( |
208 CREATE TABLE {{TABLE_PREFIX}}acl( |
209 rule_id int(12) UNSIGNED NOT NULL auto_increment, |
209 rule_id int(12) UNSIGNED NOT NULL auto_increment, |
210 target_type tinyint(1) UNSIGNED NOT NULL, |
210 target_type tinyint(1) UNSIGNED NOT NULL, |
211 target_id int(12) UNSIGNED NOT NULL, |
211 target_id int(12) UNSIGNED NOT NULL, |
212 page_id varchar(255), |
212 page_id varchar(255), |
213 namespace varchar(24), |
213 namespace varchar(24), |
214 rules text, |
214 rules text, |
215 PRIMARY KEY ( rule_id ) |
215 PRIMARY KEY ( rule_id ) |
216 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
216 ) CHARACTER SET `utf8`; |
217 |
217 |
218 CREATE TABLE {{TABLE_PREFIX}}search_cache( |
218 CREATE TABLE {{TABLE_PREFIX}}search_cache( |
219 search_id int(15) NOT NULL auto_increment, |
219 search_id int(15) NOT NULL auto_increment, |
220 search_time int(11) NOT NULL, |
220 search_time int(11) NOT NULL, |
221 query text, |
221 query text, |
222 results longblob, |
222 results longblob, |
223 PRIMARY KEY ( search_id ) |
223 PRIMARY KEY ( search_id ) |
224 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
224 ) CHARACTER SET `utf8`; |
225 |
225 |
226 -- Added in 1.0.1 |
226 -- Added in 1.0.1 |
227 |
227 |
228 CREATE TABLE {{TABLE_PREFIX}}page_groups( |
228 CREATE TABLE {{TABLE_PREFIX}}page_groups( |
229 pg_id mediumint(8) NOT NULL auto_increment, |
229 pg_id mediumint(8) NOT NULL auto_increment, |
230 pg_type tinyint(2) NOT NULL DEFAULT 1, |
230 pg_type tinyint(2) NOT NULL DEFAULT 1, |
231 pg_name varchar(255) NOT NULL DEFAULT '', |
231 pg_name varchar(255) NOT NULL DEFAULT '', |
232 pg_target varchar(255) DEFAULT NULL, |
232 pg_target varchar(255) DEFAULT NULL, |
233 PRIMARY KEY ( pg_id ) |
233 PRIMARY KEY ( pg_id ) |
234 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
234 ) CHARACTER SET `utf8`; |
235 |
235 |
236 -- Added in 1.0.1 |
236 -- Added in 1.0.1 |
237 |
237 |
238 CREATE TABLE {{TABLE_PREFIX}}page_group_members( |
238 CREATE TABLE {{TABLE_PREFIX}}page_group_members( |
239 pg_member_id int(12) NOT NULL auto_increment, |
239 pg_member_id int(12) NOT NULL auto_increment, |
240 pg_id mediumint(8) NOT NULL, |
240 pg_id mediumint(8) NOT NULL, |
241 page_id varchar(63) NOT NULL, |
241 page_id varchar(63) NOT NULL, |
242 namespace varchar(63) NOT NULL DEFAULT 'Article', |
242 namespace varchar(63) NOT NULL DEFAULT 'Article', |
243 PRIMARY KEY ( pg_member_id ) |
243 PRIMARY KEY ( pg_member_id ) |
244 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
244 ) CHARACTER SET `utf8`; |
245 |
245 |
246 -- Added in 1.0.1 |
246 -- Added in 1.0.1 |
247 |
247 |
248 CREATE TABLE {{TABLE_PREFIX}}tags( |
248 CREATE TABLE {{TABLE_PREFIX}}tags( |
249 tag_id int(12) NOT NULL auto_increment, |
249 tag_id int(12) NOT NULL auto_increment, |
250 tag_name varchar(63) NOT NULL DEFAULT 'bla', |
250 tag_name varchar(63) NOT NULL DEFAULT 'bla', |
251 page_id varchar(255) NOT NULL, |
251 page_id varchar(255) NOT NULL, |
252 namespace varchar(255) NOT NULL, |
252 namespace varchar(255) NOT NULL, |
253 user mediumint(8) NOT NULL DEFAULT 1, |
253 user mediumint(8) NOT NULL DEFAULT 1, |
254 PRIMARY KEY ( tag_id ) |
254 PRIMARY KEY ( tag_id ) |
255 ) CHARACTER SET `utf8` COLLATE `utf8_bin`; |
255 ) CHARACTER SET `utf8`; |
256 |
256 |
257 INSERT INTO {{TABLE_PREFIX}}config(config_name, config_value) VALUES |
257 INSERT INTO {{TABLE_PREFIX}}config(config_name, config_value) VALUES |
258 ('site_name', '{{SITE_NAME}}'), |
258 ('site_name', '{{SITE_NAME}}'), |
259 ('main_page', 'Main_Page'), |
259 ('main_page', 'Main_Page'), |
260 ('site_desc', '{{SITE_DESC}}'), |
260 ('site_desc', '{{SITE_DESC}}'), |