Check data key and sanitize value for getDataAttributes
[GitHub/WoltLab/WCF.git] / wcfsetup / setup / db / install.sql
CommitLineData
059bcdba
AE
1/*
2 This table was moved up here, because it must be created during the first iteration
3
4 DO *NOT* MOVE IT BACK!
5*/
6DROP TABLE IF EXISTS wcf1_package_installation_sql_log;
7CREATE TABLE wcf1_package_installation_sql_log (
8 packageID INT(10),
9 sqlTable VARCHAR(100) NOT NULL DEFAULT '',
10 sqlColumn VARCHAR(100) NOT NULL DEFAULT '',
11 sqlIndex VARCHAR(100) NOT NULL DEFAULT '',
12 UNIQUE KEY packageID (packageID, sqlTable, sqlColumn, sqlIndex)
13);
14
9f959ced 15/* tables */
092bdf82
AE
16DROP TABLE IF EXISTS wcf1_acl_option;
17CREATE TABLE wcf1_acl_option (
18 optionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
19 packageID INT(10) NOT NULL,
20 objectTypeID INT(10) NOT NULL,
a2bdc5f8
AE
21 optionName VARCHAR(191) NOT NULL,
22 categoryName VARCHAR(191) NOT NULL,
1e895431 23 UNIQUE KEY (packageID, objectTypeID, optionName)
092bdf82
AE
24);
25
26DROP TABLE IF EXISTS wcf1_acl_option_category;
27CREATE TABLE wcf1_acl_option_category (
28 categoryID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
29 packageID INT(10) NOT NULL,
30 objectTypeID INT(10) NOT NULL,
a2bdc5f8 31 categoryName VARCHAR(191) NOT NULL,
1e895431 32 UNIQUE KEY (packageID, objectTypeID, categoryName)
092bdf82
AE
33);
34
35DROP TABLE IF EXISTS wcf1_acl_option_to_user;
36CREATE TABLE wcf1_acl_option_to_user (
37 optionID INT(10) NOT NULL,
38 objectID INT(10) NOT NULL,
39 userID INT(10) NOT NULL,
40 optionValue TINYINT(1) NOT NULL DEFAULT 0,
41 UNIQUE KEY userID (userID, objectID, optionID)
42);
43
44DROP TABLE IF EXISTS wcf1_acl_option_to_group;
45CREATE TABLE wcf1_acl_option_to_group (
46 optionID INT(10) NOT NULL,
47 objectID INT(10) NOT NULL,
48 groupID INT(10) NOT NULL,
49 optionValue TINYINT(1) NOT NULL DEFAULT 0,
50 UNIQUE KEY groupID (groupID, objectID, optionID)
51);
52
2441de47
AE
53DROP TABLE IF EXISTS wcf1_acl_simple_to_user;
54CREATE TABLE wcf1_acl_simple_to_user (
55 objectTypeID INT(10) NOT NULL,
56 objectID INT(10) NOT NULL,
57 userID INT(10) NOT NULL,
58 UNIQUE KEY userKey (objectTypeID, objectID, userID)
59);
60
61DROP TABLE IF EXISTS wcf1_acl_simple_to_group;
62CREATE TABLE wcf1_acl_simple_to_group (
63 objectTypeID INT(10) NOT NULL,
64 objectID INT(10) NOT NULL,
65 groupID INT(10) NOT NULL,
66 UNIQUE KEY groupKey (objectTypeID, objectID, groupID)
67);
68
158bd3ca
TD
69DROP TABLE IF EXISTS wcf1_acp_menu_item;
70CREATE TABLE wcf1_acp_menu_item (
71 menuItemID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
72 packageID INT(10) NOT NULL,
a2bdc5f8
AE
73 menuItem VARCHAR(191) NOT NULL DEFAULT '',
74 parentMenuItem VARCHAR(191) NOT NULL DEFAULT '',
b6169da5 75 menuItemController VARCHAR(255) NOT NULL DEFAULT '',
158bd3ca
TD
76 menuItemLink VARCHAR(255) NOT NULL DEFAULT '',
77 showOrder INT(10) NOT NULL DEFAULT 0,
78 permissions TEXT,
79 options TEXT,
1e895431
AE
80 icon VARCHAR(255) NOT NULL DEFAULT '',
81 UNIQUE KEY menuItem (menuItem, packageID)
158bd3ca
TD
82);
83
e9311b98
AE
84DROP TABLE IF EXISTS wcf1_acp_search_provider;
85CREATE TABLE wcf1_acp_search_provider (
86 providerID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
87 packageID INT(10) NOT NULL,
a2bdc5f8 88 providerName VARCHAR(191) NOT NULL DEFAULT '',
e9311b98 89 className VARCHAR(255) NOT NULL DEFAULT '',
1e895431
AE
90 showOrder INT(10) NOT NULL DEFAULT 0,
91 UNIQUE KEY providerName (providerName, packageID)
e9311b98
AE
92);
93
158bd3ca
TD
94DROP TABLE IF EXISTS wcf1_acp_session;
95CREATE TABLE wcf1_acp_session (
96 sessionID CHAR(40) NOT NULL PRIMARY KEY,
158bd3ca
TD
97 userID INT(10),
98 ipAddress VARCHAR(39) NOT NULL DEFAULT '',
99 userAgent VARCHAR(255) NOT NULL DEFAULT '',
100 lastActivityTime INT(10) NOT NULL DEFAULT 0,
101 requestURI VARCHAR(255) NOT NULL DEFAULT '',
36c2ea0f
AE
102 requestMethod VARCHAR(7) NOT NULL DEFAULT '',
103 sessionVariables MEDIUMTEXT
158bd3ca
TD
104);
105
158bd3ca
TD
106DROP TABLE IF EXISTS wcf1_acp_session_access_log;
107CREATE TABLE wcf1_acp_session_access_log (
108 sessionAccessLogID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
109 sessionLogID INT(10) NOT NULL,
158bd3ca
TD
110 ipAddress VARCHAR(39) NOT NULL DEFAULT '',
111 time INT(10) NOT NULL DEFAULT 0,
112 requestURI VARCHAR(255) NOT NULL DEFAULT '',
98f447b0 113 requestMethod VARCHAR(7) NOT NULL DEFAULT '',
158bd3ca
TD
114 className VARCHAR(255) NOT NULL DEFAULT '',
115 KEY sessionLogID (sessionLogID)
116);
117
118DROP TABLE IF EXISTS wcf1_acp_session_log;
119CREATE TABLE wcf1_acp_session_log (
120 sessionLogID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
121 sessionID CHAR(40) NOT NULL DEFAULT '',
122 userID INT(10),
123 ipAddress VARCHAR(39) NOT NULL DEFAULT '',
124 hostname VARCHAR(255) NOT NULL DEFAULT '',
125 userAgent VARCHAR(255) NOT NULL DEFAULT '',
126 time INT(10) NOT NULL DEFAULT 0,
127 lastActivityTime INT(10) NOT NULL DEFAULT 0,
128 KEY sessionID (sessionID)
129);
130
e1622bfa
TD
131DROP TABLE IF EXISTS wcf1_acp_session_virtual;
132CREATE TABLE wcf1_acp_session_virtual (
133 virtualSessionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
134 sessionID CHAR(40) NOT NULL,
135 ipAddress VARCHAR(39) NOT NULL DEFAULT '',
a2bdc5f8 136 userAgent VARCHAR(191) NOT NULL DEFAULT '',
e1622bfa
TD
137 lastActivityTime INT(10) NOT NULL DEFAULT 0,
138 UNIQUE KEY (sessionID, ipAddress, userAgent)
139);
140
158bd3ca
TD
141DROP TABLE IF EXISTS wcf1_acp_template;
142CREATE TABLE wcf1_acp_template (
143 templateID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
144 packageID INT(10),
a2bdc5f8 145 templateName VARCHAR(191) NOT NULL,
1e895431
AE
146 application VARCHAR(20) NOT NULL,
147 UNIQUE KEY applicationTemplate (application, templateName)
158bd3ca
TD
148);
149
e866b80e
MS
150DROP TABLE IF EXISTS wcf1_ad;
151CREATE TABLE wcf1_ad (
152 adID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
153 objectTypeID INT(10) NOT NULL,
154 adName VARCHAR(255) NOT NULL,
155 ad MEDIUMTEXT,
156 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
157 showOrder INT(10) NOT NULL DEFAULT 0
158);
159
158bd3ca
TD
160DROP TABLE IF EXISTS wcf1_application;
161CREATE TABLE wcf1_application (
162 packageID INT(10) NOT NULL PRIMARY KEY,
163 domainName VARCHAR(255) NOT NULL,
164 domainPath VARCHAR(255) NOT NULL DEFAULT '/',
668cf125 165 cookieDomain VARCHAR(255) NOT NULL,
124dcf73
AE
166 isTainted TINYINT(1) NOT NULL DEFAULT 0,
167 landingPageID INT(10) NULL
158bd3ca
TD
168);
169
a5a4f02d
MW
170DROP TABLE IF EXISTS wcf1_article;
171CREATE TABLE wcf1_article (
172 articleID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
173 userID INT(10),
174 username VARCHAR(255) NOT NULL DEFAULT '',
175 time INT(10) NOT NULL DEFAULT 0,
176 categoryID INT(10),
177 isMultilingual TINYINT(1) NOT NULL DEFAULT 0,
178 publicationStatus TINYINT(1) NOT NULL DEFAULT 1,
179 publicationDate INT(10) NOT NULL DEFAULT 0,
180 enableComments TINYINT(1) NOT NULL DEFAULT 1,
181 comments SMALLINT(5) NOT NULL DEFAULT 0,
182 views MEDIUMINT(7) NOT NULL DEFAULT 0,
183 cumulativeLikes MEDIUMINT(7) NOT NULL DEFAULT 0,
a81168d4 184 isDeleted TINYINT(1) NOT NULL DEFAULT 0,
1177a643 185 hasLabels TINYINT(1) NOT NULL DEFAULT 0,
a5a4f02d
MW
186
187 KEY (time)
188);
189
190DROP TABLE IF EXISTS wcf1_article_content;
191CREATE TABLE wcf1_article_content (
192 articleContentID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
193 articleID INT(10) NOT NULL,
194 languageID INT(10),
195 title VARCHAR(255) NOT NULL,
196 teaser TEXT,
197 content MEDIUMTEXT,
198 imageID INT(10),
79305986 199 teaserImageID INT(10),
ef17c746 200 hasEmbeddedObjects TINYINT(1) NOT NULL DEFAULT 0,
a5a4f02d
MW
201
202 UNIQUE KEY (articleID, languageID)
203);
204
f0bc263f
MW
205DROP TABLE IF EXISTS wcf1_attachment;
206CREATE TABLE wcf1_attachment (
207 attachmentID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
208 objectTypeID INT(10) NOT NULL,
209 objectID INT(10),
210 userID INT(10),
211 tmpHash VARCHAR(40) NOT NULL DEFAULT '',
212 filename VARCHAR(255) NOT NULL DEFAULT '',
213 filesize INT(10) NOT NULL DEFAULT 0,
214 fileType VARCHAR(255) NOT NULL DEFAULT '',
215 fileHash VARCHAR(40) NOT NULL DEFAULT '',
216
217 isImage TINYINT(1) NOT NULL DEFAULT 0,
218 width SMALLINT(5) NOT NULL DEFAULT 0,
59ab4d0f 219 height SMALLINT(5) NOT NULL DEFAULT 0,
f0bc263f
MW
220
221 tinyThumbnailType VARCHAR(255) NOT NULL DEFAULT '',
222 tinyThumbnailSize INT(10) NOT NULL DEFAULT 0,
223 tinyThumbnailWidth SMALLINT(5) NOT NULL DEFAULT 0,
224 tinyThumbnailHeight SMALLINT(5) NOT NULL DEFAULT 0,
225
226 thumbnailType VARCHAR(255) NOT NULL DEFAULT '',
227 thumbnailSize INT(10) NOT NULL DEFAULT 0,
228 thumbnailWidth SMALLINT(5) NOT NULL DEFAULT 0,
229 thumbnailHeight SMALLINT(5) NOT NULL DEFAULT 0,
230
231 downloads INT(10) NOT NULL DEFAULT 0,
232 lastDownloadTime INT(10) NOT NULL DEFAULT 0,
233 uploadTime INT(10) NOT NULL DEFAULT 0,
234 showOrder SMALLINT(5) NOT NULL DEFAULT 0,
235 KEY (objectTypeID, objectID),
236 KEY (objectTypeID, tmpHash),
237 KEY (objectID, uploadTime)
238);
239
db6698ad
TD
240DROP TABLE IF EXISTS wcf1_background_job;
241CREATE TABLE wcf1_background_job (
242 jobID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
d7861782 243 job MEDIUMBLOB NOT NULL,
db6698ad
TD
244 status ENUM('ready', 'processing') NOT NULL DEFAULT 'ready',
245 time INT(10) NOT NULL,
246 KEY (status, time)
247);
248
dcc2332d
MW
249DROP TABLE IF EXISTS wcf1_bbcode;
250CREATE TABLE wcf1_bbcode (
251 bbcodeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
a2bdc5f8 252 bbcodeTag VARCHAR(191) NOT NULL,
dcc2332d
MW
253 packageID INT(10) NOT NULL,
254 htmlOpen VARCHAR(255) NOT NULL DEFAULT '',
255 htmlClose VARCHAR(255) NOT NULL DEFAULT '',
dcc2332d
MW
256 className VARCHAR(255) NOT NULL DEFAULT '',
257 wysiwygIcon varchar(255) NOT NULL DEFAULT '',
258 buttonLabel VARCHAR(255) NOT NULL DEFAULT '',
ece28c21 259 isBlockElement TINYINT(1) NOT NULL DEFAULT 0,
dcc2332d 260 isSourceCode TINYINT(1) NOT NULL DEFAULT 0,
dcc2332d 261 showButton TINYINT(1) NOT NULL DEFAULT 0,
1e895431
AE
262 originIsSystem TINYINT(1) NOT NULL DEFAULT 0,
263 UNIQUE KEY bbcodeTag (bbcodeTag)
dcc2332d
MW
264);
265
266DROP TABLE IF EXISTS wcf1_bbcode_attribute;
267CREATE TABLE wcf1_bbcode_attribute (
268 attributeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
269 bbcodeID INT(10) NOT NULL,
270 attributeNo TINYINT(3) NOT NULL DEFAULT 0,
271 attributeHtml VARCHAR(255) NOT NULL DEFAULT '',
272 validationPattern VARCHAR(255) NOT NULL DEFAULT '',
273 required TINYINT(1) NOT NULL DEFAULT 0,
274 useText TINYINT(1) NOT NULL DEFAULT 0,
275 UNIQUE KEY attributeNo (bbcodeID, attributeNo)
276);
277
278DROP TABLE IF EXISTS wcf1_bbcode_media_provider;
279CREATE TABLE wcf1_bbcode_media_provider (
280 providerID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
7d346d2a
MW
281 name VARCHAR(80) NOT NULL,
282 packageID INT(10) NOT NULL,
dcc2332d
MW
283 title VARCHAR(255) NOT NULL,
284 regex TEXT NOT NULL,
cba8f591 285 html TEXT NOT NULL,
7d346d2a
MW
286 className varchar(255) NOT NULL DEFAULT '',
287 UNIQUE KEY name (name, packageID)
dcc2332d
MW
288);
289
11fd4618
MW
290DROP TABLE IF EXISTS wcf1_box;
291CREATE TABLE wcf1_box (
292 boxID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
91317611 293 objectTypeID INT(10),
11fd4618
MW
294 identifier VARCHAR(255) NOT NULL,
295 name VARCHAR(255) NOT NULL,
296 boxType VARCHAR(255) NOT NULL,
297 position VARCHAR(255) NOT NULL,
298 showOrder INT(10) NOT NULL DEFAULT 0,
299 visibleEverywhere TINYINT(1) NOT NULL DEFAULT 1,
300 isMultilingual TINYINT(1) NOT NULL DEFAULT 0,
117f5ae9 301 lastUpdateTime INT(10) NOT NULL DEFAULT 0,
11fd4618
MW
302 cssClassName VARCHAR(255) NOT NULL DEFAULT '',
303 showHeader TINYINT(1) NOT NULL DEFAULT 1,
304 originIsSystem TINYINT(1) NOT NULL DEFAULT 0,
305 packageID INT(10) NOT NULL,
91317611 306 menuID INT(10) NULL,
5636588a
MW
307 linkPageID INT(10),
308 linkPageObjectID INT(10) NOT NULL DEFAULT 0,
91317611
MS
309 externalURL VARCHAR(255) NOT NULL DEFAULT '',
310 additionalData TEXT
11fd4618
MW
311);
312
313DROP TABLE IF EXISTS wcf1_box_content;
314CREATE TABLE wcf1_box_content (
2f273839 315 boxContentID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
11fd4618
MW
316 boxID INT(10) NOT NULL,
317 languageID INT(10),
318 title VARCHAR(255) NOT NULL,
319 content MEDIUMTEXT,
56eb7314 320 imageID INT(10),
2f273839 321 hasEmbeddedObjects TINYINT(1) NOT NULL DEFAULT 0,
11fd4618 322
2f273839 323 UNIQUE KEY (boxID, languageID)
11fd4618
MW
324);
325
53cf1c00
MW
326DROP TABLE IF EXISTS wcf1_box_to_page;
327CREATE TABLE wcf1_box_to_page (
328 boxID INT(10) NOT NULL,
329 pageID INT(10) NOT NULL,
330 visible TINYINT(1) NOT NULL DEFAULT 1,
331
332 UNIQUE KEY (pageID, boxID),
333 KEY (pageID, visible)
334);
335
96714cab
MS
336DROP TABLE IF EXISTS wcf1_captcha_question;
337CREATE TABLE wcf1_captcha_question (
338 questionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
339 question VARCHAR(255) NOT NULL,
340 answers MEDIUMTEXT,
341 isDisabled TINYINT(1) NOT NULL DEFAULT 0
342);
343
13d8b49b
MS
344DROP TABLE IF EXISTS wcf1_category;
345CREATE TABLE wcf1_category (
346 categoryID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
347 objectTypeID INT(10) NOT NULL,
da06d70c 348 parentCategoryID INT(10) NOT NULL DEFAULT 0,
13d8b49b
MS
349 title VARCHAR(255) NOT NULL,
350 description TEXT,
da06d70c
MW
351 showOrder INT(10) NOT NULL DEFAULT 0,
352 time INT(10) NOT NULL DEFAULT 0,
13d8b49b 353 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
045f075b 354 additionalData TEXT
13d8b49b
MS
355);
356
054db725
TD
357DROP TABLE IF EXISTS wcf1_cli_history;
358CREATE TABLE wcf1_cli_history (
359 historyItem INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
360 userID INT(10) NOT NULL,
361 command VARCHAR(255) NOT NULL,
362 KEY (userID)
363);
364
0d6ea23f
AE
365DROP TABLE IF EXISTS wcf1_clipboard_action;
366CREATE TABLE wcf1_clipboard_action (
367 actionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
368 packageID INT(10) NOT NULL DEFAULT 0,
369 actionName VARCHAR(50) NOT NULL DEFAULT '',
a2bdc5f8 370 actionClassName VARCHAR(191) NOT NULL DEFAULT '',
1e895431
AE
371 showOrder INT(10) NOT NULL DEFAULT 0,
372 UNIQUE KEY actionName (packageID, actionName, actionClassName)
0d6ea23f
AE
373);
374
375DROP TABLE IF EXISTS wcf1_clipboard_item;
376CREATE TABLE wcf1_clipboard_item (
25cf4d11 377 objectTypeID INT(10) NOT NULL DEFAULT 0,
0d6ea23f 378 userID INT(10) NOT NULL DEFAULT 0,
25cf4d11 379 objectID INT(10) NOT NULL DEFAULT 0,
62312370
TD
380 UNIQUE KEY (objectTypeID, userID, objectID),
381 KEY (userID)
0d6ea23f
AE
382);
383
384DROP TABLE IF EXISTS wcf1_clipboard_page;
385CREATE TABLE wcf1_clipboard_page (
386 pageClassName VARCHAR(80) NOT NULL DEFAULT '',
387 packageID INT(10) NOT NULL DEFAULT 0,
388 actionID INT(10) NOT NULL DEFAULT 0
389);
390
285b1d92
MW
391DROP TABLE IF EXISTS wcf1_comment;
392CREATE TABLE wcf1_comment (
393 commentID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
394 objectTypeID INT(10) NOT NULL,
395 objectID INT(10) NOT NULL,
396 time INT(10) NOT NULL DEFAULT '0',
397 userID INT(10),
398 username VARCHAR(255) NOT NULL,
316a25b7 399 message MEDIUMTEXT NOT NULL,
285b1d92 400 responses MEDIUMINT(7) NOT NULL DEFAULT '0',
6f874ba8 401 responseIDs VARCHAR(255) NOT NULL DEFAULT '',
c1687129
AE
402 unfilteredResponses MEDIUMINT(7) NOT NULL DEFAULT '0',
403 unfilteredResponseIDs VARCHAR(255) NOT NULL DEFAULT '',
53e22ab9 404 enableHtml TINYINT(1) NOT NULL DEFAULT 0,
3e84029c 405 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
285b1d92 406
3e84029c 407 KEY (objectTypeID, objectID, isDisabled, time),
e36dbd69 408 KEY lastCommentTime (userID, time)
285b1d92
MW
409);
410
411DROP TABLE IF EXISTS wcf1_comment_response;
412CREATE TABLE wcf1_comment_response (
413 responseID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
414 commentID INT(10) NOT NULL,
415 time INT(10) NOT NULL DEFAULT '0',
416 userID INT(10),
417 username VARCHAR(255) NOT NULL,
316a25b7 418 message MEDIUMTEXT NOT NULL,
564a5ac3 419 enableHtml TINYINT(1) NOT NULL DEFAULT 0,
3e84029c 420 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
285b1d92 421
3e84029c 422 KEY (commentID, isDisabled, time),
e36dbd69 423 KEY lastResponseTime (userID, time)
285b1d92
MW
424);
425
87d3a054
MS
426DROP TABLE IF EXISTS wcf1_condition;
427CREATE TABLE wcf1_condition (
428 conditionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
429 objectTypeID INT(10) NOT NULL,
430 objectID INT(10) NOT NULL,
431 conditionData MEDIUMTEXT
432);
433
c308c947
AE
434DROP TABLE IF EXISTS wcf1_contact_option;
435CREATE TABLE wcf1_contact_option (
436 optionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
437 optionTitle VARCHAR(255) NOT NULL DEFAULT '',
438 optionDescription TEXT,
439 optionType VARCHAR(255) NOT NULL DEFAULT '',
440 defaultValue MEDIUMTEXT,
441 validationPattern TEXT,
442 selectOptions MEDIUMTEXT,
443 required TINYINT(1) NOT NULL DEFAULT 0,
444 showOrder INT(10) NOT NULL DEFAULT 0,
445 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
446 originIsSystem TINYINT(1) NOT NULL DEFAULT 0
447);
448
d486ae88
AE
449DROP TABLE IF EXISTS wcf1_contact_recipient;
450CREATE TABLE wcf1_contact_recipient (
451 recipientID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
452 name VARCHAR(255) NOT NULL,
453 email VARCHAR(255) NOT NULL,
454 showOrder INT(10) NOT NULL DEFAULT 0,
455 isAdministrator TINYINT(1) NOT NULL DEFAULT 0,
456 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
457 originIsSystem TINYINT(1) NOT NULL DEFAULT 0
458);
459
059bcdba
AE
460/* SQL_PARSER_OFFSET */
461
158bd3ca
TD
462DROP TABLE IF EXISTS wcf1_core_object;
463CREATE TABLE wcf1_core_object (
464 objectID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
465 packageID INT(10) NOT NULL,
a2bdc5f8 466 objectName VARCHAR(191) NOT NULL DEFAULT '',
1e895431 467 UNIQUE KEY object (packageID, objectName)
158bd3ca
TD
468);
469
470DROP TABLE IF EXISTS wcf1_cronjob;
471CREATE TABLE wcf1_cronjob (
472 cronjobID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
473 className varchar(255) NOT NULL DEFAULT '',
474 packageID INT(10) NOT NULL,
a2bdc5f8 475 cronjobName VARCHAR(191) NOT NULL,
158bd3ca
TD
476 description varchar(255) NOT NULL DEFAULT '',
477 startMinute varchar(255) NOT NULL DEFAULT '*',
478 startHour varchar(255) NOT NULL DEFAULT '*',
479 startDom varchar(255) NOT NULL DEFAULT '*',
480 startMonth varchar(255) NOT NULL DEFAULT '*',
481 startDow varchar(255) NOT NULL DEFAULT '*',
482 lastExec INT(10) NOT NULL DEFAULT 0,
483 nextExec INT(10) NOT NULL DEFAULT 0,
484 afterNextExec INT(10) NOT NULL DEFAULT 0,
8f08c7d0 485 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
c9117aad
MS
486 canBeEdited TINYINT(1) NOT NULL DEFAULT 1,
487 canBeDisabled TINYINT(1) NOT NULL DEFAULT 1,
488 state TINYINT(1) NOT NULL DEFAULT 0,
0fb52d6b 489 failCount TINYINT(1) NOT NULL DEFAULT 0,
1e895431
AE
490 options TEXT,
491
492 UNIQUE KEY cronjobName (cronjobName, packageID)
158bd3ca
TD
493);
494
495DROP TABLE IF EXISTS wcf1_cronjob_log;
496CREATE TABLE wcf1_cronjob_log (
497 cronjobLogID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
498 cronjobID INT(10) NOT NULL,
499 execTime INT(10) NOT NULL DEFAULT 0,
c9117aad 500 success TINYINT(1) NOT NULL DEFAULT 0,
158bd3ca
TD
501 error TEXT
502);
503
d7424422
AE
504DROP TABLE IF EXISTS wcf1_devtools_project;
505CREATE TABLE wcf1_devtools_project (
506 projectID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
507 name VARCHAR(191) NOT NULL,
fc127c6b
MS
508 path TEXT,
509
510 UNIQUE KEY name (name)
d7424422
AE
511);
512
81aa6374
TD
513DROP TABLE IF EXISTS wcf1_edit_history_entry;
514CREATE TABLE wcf1_edit_history_entry (
515 entryID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
516 objectTypeID INT(10) NOT NULL,
517 objectID INT(10) NOT NULL,
518 userID INT(10),
519 username VARCHAR(255) NOT NULL DEFAULT '',
ed6a4e42
MS
520 time INT(10) NOT NULL DEFAULT 0,
521 obsoletedAt INT(10) NOT NULL DEFAULT 0,
f86d7ff7 522 obsoletedByUserID INT(10),
81aa6374
TD
523 message MEDIUMTEXT,
524 editReason TEXT,
525
f86d7ff7
TD
526 KEY (objectTypeID, objectID),
527 KEY (obsoletedAt, obsoletedByUserID)
81aa6374
TD
528);
529
158bd3ca
TD
530DROP TABLE IF EXISTS wcf1_event_listener;
531CREATE TABLE wcf1_event_listener (
532 listenerID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
533 packageID INT(10) NOT NULL,
7e6405f8 534 environment ENUM('user', 'admin') NOT NULL DEFAULT 'user',
a2bdc5f8 535 listenerName VARCHAR(191) NOT NULL,
09ff6e15 536 eventClassName VARCHAR(255) NOT NULL DEFAULT '',
c9ebc679 537 eventName TEXT,
158bd3ca
TD
538 listenerClassName VARCHAR(200) NOT NULL DEFAULT '',
539 inherit TINYINT(1) NOT NULL DEFAULT 0,
540 niceValue TINYINT(3) NOT NULL DEFAULT 0,
ffdebe9c 541 permissions TEXT,
1e895431
AE
542 options TEXT,
543
544 UNIQUE KEY listenerName (listenerName, packageID)
158bd3ca
TD
545);
546
78db8ddf
MW
547DROP TABLE IF EXISTS wcf1_import_mapping;
548CREATE TABLE wcf1_import_mapping (
8d8368ee 549 importHash CHAR(8) NOT NULL,
78db8ddf 550 objectTypeID INT(10) NOT NULL,
a2bdc5f8 551 oldID VARCHAR(191) NOT NULL,
78db8ddf 552 newID INT(10) NOT NULL,
8d8368ee 553 UNIQUE KEY (importHash, objectTypeID, oldID)
78db8ddf
MW
554);
555
3b75466f
MW
556DROP TABLE IF EXISTS wcf1_label;
557CREATE TABLE wcf1_label (
558 labelID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
559 groupID INT(10) NOT NULL,
560 label VARCHAR(80) NOT NULL,
d8475f48
MS
561 cssClassName VARCHAR(255) NOT NULL DEFAULT '',
562 showOrder INT(10) NOT NULL DEFAULT 0
3b75466f
MW
563);
564
565DROP TABLE IF EXISTS wcf1_label_group;
566CREATE TABLE wcf1_label_group (
567 groupID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
568 groupName VARCHAR(80) NOT NULL,
f3db386c 569 groupDescription VARCHAR(255) NOT NULL DEFAULT '',
e76c454b
AE
570 forceSelection TINYINT(1) NOT NULL DEFAULT 0,
571 showOrder INT(10) NOT NULL DEFAULT 0
3b75466f
MW
572);
573
574DROP TABLE IF EXISTS wcf1_label_group_to_object;
575CREATE TABLE wcf1_label_group_to_object (
576 groupID INT(10) NOT NULL,
577 objectTypeID INT(10) NOT NULL,
578 objectID INT(10) NULL
579);
580
581DROP TABLE IF EXISTS wcf1_label_object;
582CREATE TABLE wcf1_label_object (
583 labelID INT(10) NOT NULL,
584 objectTypeID INT(10) NOT NULL,
585 objectID INT(10) NOT NULL,
586
587 KEY (objectTypeID, labelID),
588 KEY (objectTypeID, objectID)
589);
590
158bd3ca
TD
591DROP TABLE IF EXISTS wcf1_language;
592CREATE TABLE wcf1_language (
593 languageID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
594 languageCode VARCHAR(20) NOT NULL DEFAULT '',
a74df36b 595 languageName VARCHAR(255) NOT NULL DEFAULT '',
6675b340 596 countryCode VARCHAR(10) NOT NULL DEFAULT '',
158bd3ca
TD
597 isDefault TINYINT(1) NOT NULL DEFAULT 0,
598 hasContent TINYINT(1) NOT NULL DEFAULT 0,
408effbc 599 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
158bd3ca
TD
600 UNIQUE KEY languageCode (languageCode)
601);
602
603DROP TABLE IF EXISTS wcf1_language_category;
604CREATE TABLE wcf1_language_category (
605 languageCategoryID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
a2bdc5f8 606 languageCategory VARCHAR(191) NOT NULL DEFAULT '',
1e895431 607 UNIQUE KEY languageCategory (languageCategory)
158bd3ca
TD
608);
609
610DROP TABLE IF EXISTS wcf1_language_item;
611CREATE TABLE wcf1_language_item (
612 languageItemID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
613 languageID INT(10) NOT NULL,
a2bdc5f8 614 languageItem VARCHAR(191) NOT NULL DEFAULT '',
158bd3ca
TD
615 languageItemValue MEDIUMTEXT NOT NULL,
616 languageCustomItemValue MEDIUMTEXT,
617 languageUseCustomValue TINYINT(1) NOT NULL DEFAULT 0,
618 languageItemOriginIsSystem TINYINT(1) NOT NULL DEFAULT 1,
619 languageCategoryID INT(10) NOT NULL,
620 packageID INT(10),
f52faf33
AE
621 languageItemOldValue MEDIUMTEXT,
622 languageCustomItemDisableTime INT(10),
f1c1fc65 623 UNIQUE KEY languageItem (languageItem, languageID),
158bd3ca
TD
624 KEY languageItemOriginIsSystem (languageItemOriginIsSystem)
625);
626
00b6f956
MW
627DROP TABLE IF EXISTS wcf1_like;
628CREATE TABLE wcf1_like (
629 likeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
630 objectID INT(10) NOT NULL DEFAULT 0,
631 objectTypeID INT(10) NOT NULL,
632 objectUserID INT(10),
633 userID INT(10) NOT NULL,
1ba3f564 634 time INT(10) NOT NULL DEFAULT 1,
00b6f956 635 likeValue TINYINT(1) NOT NULL DEFAULT 1,
2558960e 636 reactionTypeID INT(10) NOT NULL,
00b6f956
MW
637 UNIQUE KEY (objectTypeID, objectID, userID)
638);
639
640DROP TABLE IF EXISTS wcf1_like_object;
641CREATE TABLE wcf1_like_object (
642 likeObjectID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
643 objectTypeID INT(10) NOT NULL,
644 objectID INT(10) NOT NULL DEFAULT 0,
645 objectUserID INT(10),
646 likes MEDIUMINT(7) NOT NULL DEFAULT 0,
647 dislikes MEDIUMINT(7) NOT NULL DEFAULT 0,
648 cumulativeLikes MEDIUMINT(7) NOT NULL DEFAULT 0,
649 cachedUsers TEXT,
9a265ae1 650 cachedReactions TEXT,
00b6f956
MW
651 UNIQUE KEY (objectTypeID, objectID)
652);
653
59ab4d0f
MS
654DROP TABLE IF EXISTS wcf1_media;
655CREATE TABLE wcf1_media (
656 mediaID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
cf4e950c 657 categoryID INT(10),
59ab4d0f
MS
658
659 filename VARCHAR(255) NOT NULL DEFAULT '',
660 filesize INT(10) NOT NULL DEFAULT 0,
661 fileType VARCHAR(255) NOT NULL DEFAULT '',
662 fileHash VARCHAR(255) NOT NULL DEFAULT '',
663 uploadTime INT(10) NOT NULL DEFAULT 0,
664 userID INT(10),
665 username VARCHAR(255) NOT NULL,
666 languageID INT(10),
667 isMultilingual TINYINT(1) NOT NULL DEFAULT 0,
668
669 isImage TINYINT(1) NOT NULL DEFAULT 0,
670 width SMALLINT(5) NOT NULL DEFAULT 0,
671 height SMALLINT(5) NOT NULL DEFAULT 0,
672
673 tinyThumbnailType VARCHAR(255) NOT NULL DEFAULT '',
674 tinyThumbnailSize INT(10) NOT NULL DEFAULT 0,
675 tinyThumbnailWidth SMALLINT(5) NOT NULL DEFAULT 0,
676 tinyThumbnailHeight SMALLINT(5) NOT NULL DEFAULT 0,
677
678 smallThumbnailType VARCHAR(255) NOT NULL DEFAULT '',
679 smallThumbnailSize INT(10) NOT NULL DEFAULT 0,
680 smallThumbnailWidth SMALLINT(5) NOT NULL DEFAULT 0,
681 smallThumbnailHeight SMALLINT(5) NOT NULL DEFAULT 0,
682
683 mediumThumbnailType VARCHAR(255) NOT NULL DEFAULT '',
684 mediumThumbnailSize INT(10) NOT NULL DEFAULT 0,
685 mediumThumbnailWidth SMALLINT(5) NOT NULL DEFAULT 0,
686 mediumThumbnailHeight SMALLINT(5) NOT NULL DEFAULT 0,
687
688 largeThumbnailType VARCHAR(255) NOT NULL DEFAULT '',
689 largeThumbnailSize INT(10) NOT NULL DEFAULT 0,
690 largeThumbnailWidth SMALLINT(5) NOT NULL DEFAULT 0,
691 largeThumbnailHeight SMALLINT(5) NOT NULL DEFAULT 0
692);
693
694DROP TABLE IF EXISTS wcf1_media_content;
695CREATE TABLE wcf1_media_content (
696 mediaID INT(10) NOT NULL,
697 languageID INT(10),
698 title VARCHAR(255) NOT NULL,
699 caption TEXT,
700 altText VARCHAR(255) NOT NULL DEFAULT '',
701 UNIQUE KEY (mediaID, languageID)
702);
703
e7fb3339
MW
704DROP TABLE IF EXISTS wcf1_menu;
705CREATE TABLE wcf1_menu (
706 menuID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
707 identifier VARCHAR(255) NOT NULL,
708 title VARCHAR(255) NOT NULL,
709 originIsSystem TINYINT(1) NOT NULL DEFAULT 0,
710 packageID INT(10) NOT NULL
711);
712
713DROP TABLE IF EXISTS wcf1_menu_item;
714CREATE TABLE wcf1_menu_item (
715 itemID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
716 menuID INT(10) NOT NULL,
717 parentItemID INT(10),
718 identifier VARCHAR(255) NOT NULL,
719 title VARCHAR(255) NOT NULL,
720 pageID INT(10),
86dbae33 721 pageObjectID INT(10) NOT NULL DEFAULT 0,
e7fb3339
MW
722 externalURL VARCHAR(255) NOT NULL DEFAULT '',
723 showOrder INT(10) NOT NULL DEFAULT 0,
724 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
effc9389
AE
725 originIsSystem TINYINT(1) NOT NULL DEFAULT 0,
726 packageID INT(10) NOT NULL
e7fb3339
MW
727);
728
0a2b09a2
MW
729DROP TABLE IF EXISTS wcf1_message_embedded_object;
730CREATE TABLE wcf1_message_embedded_object (
731 messageObjectTypeID INT(10) NOT NULL,
732 messageID INT(10) NOT NULL,
733 embeddedObjectTypeID INT(10) NOT NULL,
734 embeddedObjectID INT(10) NOT NULL,
735
736 KEY (messageObjectTypeID, messageID)
737);
738
fc69b61d
MW
739DROP TABLE IF EXISTS wcf1_moderation_queue;
740CREATE TABLE wcf1_moderation_queue (
741 queueID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
742 objectTypeID INT(10) NOT NULL,
743 objectID INT(10) NOT NULL,
744 containerID INT(10) NOT NULL DEFAULT 0,
745 userID INT(10) NULL,
746 time INT(10) NOT NULL DEFAULT 0,
747
748 -- internal
749 assignedUserID INT(10) NULL,
750 status TINYINT(1) NOT NULL DEFAULT 0,
166d2b91 751 comments SMALLINT(5) NOT NULL DEFAULT 0,
fc69b61d
MW
752 lastChangeTime INT(10) NOT NULL DEFAULT 0,
753
754 -- additional data, e.g. message if reporting content
6123473d
AE
755 additionalData TEXT,
756
757 KEY objectTypeAndID (objectTypeID, objectID)
fc69b61d
MW
758);
759
760DROP TABLE IF EXISTS wcf1_moderation_queue_to_user;
761CREATE TABLE wcf1_moderation_queue_to_user (
762 queueID INT(10) NOT NULL,
763 userID INT(10) NOT NULL,
764 isAffected TINYINT(1) NOT NULL DEFAULT 0,
765
766 UNIQUE KEY queue (queueID, userID),
767 KEY affected (queueID, userID, isAffected)
768);
769
3a2de7fd
AE
770DROP TABLE IF EXISTS wcf1_modification_log;
771CREATE TABLE wcf1_modification_log (
772 logID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
773 objectTypeID INT(10) NOT NULL,
774 objectID INT(10) NOT NULL,
34e6993d 775 parentObjectID INT(10),
3a2de7fd
AE
776 userID INT(10),
777 username VARCHAR(255) NOT NULL DEFAULT '',
778 time INT(10) NOT NULL DEFAULT 0,
779 action VARCHAR(80) NOT NULL,
2a6e4159 780 hidden TINYINT(1) NOT NULL DEFAULT 1,
bc4f07e7
AE
781 additionalData MEDIUMTEXT,
782
783 KEY objectTypeAndID (objectTypeID, objectID)
3a2de7fd
AE
784);
785
20933e61
MS
786DROP TABLE IF EXISTS wcf1_notice;
787CREATE TABLE wcf1_notice (
788 noticeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
789 noticeName VARCHAR(255) NOT NULL,
790 notice MEDIUMTEXT,
791 noticeUseHtml TINYINT(1) NOT NULL DEFAULT 0,
e70b5175 792 cssClassName VARCHAR(255) NOT NULL DEFAULT 'info',
20933e61
MS
793 showOrder INT(10) NOT NULL DEFAULT 0,
794 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
795 isDismissible TINYINT(1) NOT NULL DEFAULT 0
796);
797
798DROP TABLE IF EXISTS wcf1_notice_dismissed;
799CREATE TABLE wcf1_notice_dismissed (
800 noticeID INT(10) NOT NULL,
801 userID INT(10) NOT NULL,
802 PRIMARY KEY (noticeID, userID)
803);
804
7fcc7676
MW
805DROP TABLE IF EXISTS wcf1_object_type;
806CREATE TABLE wcf1_object_type (
807 objectTypeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
808 definitionID INT(10) NOT NULL,
809 packageID INT(10) NOT NULL,
a2bdc5f8 810 objectType VARCHAR(191) NOT NULL,
7fcc7676
MW
811 className VARCHAR(255) NOT NULL DEFAULT '',
812 additionalData MEDIUMTEXT,
813 UNIQUE KEY objectType (objectType, definitionID, packageID)
814);
815
816DROP TABLE IF EXISTS wcf1_object_type_definition;
817CREATE TABLE wcf1_object_type_definition (
818 definitionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
a2bdc5f8 819 definitionName VARCHAR(191) NOT NULL,
7fcc7676
MW
820 packageID INT(10) NOT NULL,
821 interfaceName VARCHAR(255) NOT NULL DEFAULT '',
1e895431
AE
822 categoryName VARCHAR(80) NOT NULL DEFAULT '',
823 UNIQUE KEY definitionName (definitionName)
7fcc7676
MW
824);
825
158bd3ca
TD
826DROP TABLE IF EXISTS wcf1_option;
827CREATE TABLE wcf1_option (
828 optionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
829 packageID INT(10) NOT NULL,
a2bdc5f8
AE
830 optionName VARCHAR(191) NOT NULL DEFAULT '',
831 categoryName VARCHAR(191) NOT NULL DEFAULT '',
158bd3ca
TD
832 optionType VARCHAR(255) NOT NULL DEFAULT '',
833 optionValue MEDIUMTEXT,
834 validationPattern TEXT,
835 selectOptions MEDIUMTEXT,
836 enableOptions MEDIUMTEXT,
837 showOrder INT(10) NOT NULL DEFAULT 0,
838 hidden TINYINT(1) NOT NULL DEFAULT 0,
839 permissions TEXT,
840 options TEXT,
cd6220f2 841 supportI18n TINYINT(1) NOT NULL DEFAULT 0,
6b45d041 842 requireI18n TINYINT(1) NOT NULL DEFAULT 0,
1e895431
AE
843 additionalData MEDIUMTEXT,
844
845 UNIQUE KEY optionName (optionName)
158bd3ca
TD
846);
847
848DROP TABLE IF EXISTS wcf1_option_category;
849CREATE TABLE wcf1_option_category (
850 categoryID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
851 packageID INT(10) NOT NULL,
a2bdc5f8
AE
852 categoryName VARCHAR(191) NOT NULL DEFAULT '',
853 parentCategoryName VARCHAR(191) NOT NULL DEFAULT '',
158bd3ca
TD
854 showOrder INT(10) NOT NULL DEFAULT 0,
855 permissions TEXT,
1e895431
AE
856 options TEXT,
857 UNIQUE KEY categoryName (categoryName)
158bd3ca
TD
858);
859
860DROP TABLE IF EXISTS wcf1_package;
861CREATE TABLE wcf1_package (
862 packageID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
746ffe3b 863 package VARCHAR(191) NOT NULL DEFAULT '',
158bd3ca
TD
864 packageDir VARCHAR(255) NOT NULL DEFAULT '',
865 packageName VARCHAR(255) NOT NULL DEFAULT '',
158bd3ca
TD
866 packageDescription VARCHAR(255) NOT NULL DEFAULT '',
867 packageVersion VARCHAR(255) NOT NULL DEFAULT '',
868 packageDate INT(10) NOT NULL DEFAULT 0,
869 installDate INT(10) NOT NULL DEFAULT 0,
870 updateDate INT(10) NOT NULL DEFAULT 0,
871 packageURL VARCHAR(255) NOT NULL DEFAULT '',
aac1247e 872 isApplication TINYINT(1) NOT NULL DEFAULT 0,
158bd3ca
TD
873 author VARCHAR(255) NOT NULL DEFAULT '',
874 authorURL VARCHAR(255) NOT NULL DEFAULT '',
875 KEY package (package)
876);
877
89484ba0
AE
878DROP TABLE IF EXISTS wcf1_package_compatibility;
879CREATE TABLE wcf1_package_compatibility (
880 packageID INT(10) NOT NULL,
881 version SMALLINT(4) NOT NULL,
882 UNIQUE KEY compatibleVersion (packageID, version)
883);
884
158bd3ca
TD
885DROP TABLE IF EXISTS wcf1_package_exclusion;
886CREATE TABLE wcf1_package_exclusion (
887 packageID INT(10) NOT NULL,
a2bdc5f8 888 excludedPackage VARCHAR(191) NOT NULL DEFAULT '',
1e895431
AE
889 excludedPackageVersion VARCHAR(255) NOT NULL DEFAULT '',
890 UNIQUE KEY packageID (packageID, excludedPackage)
158bd3ca
TD
891);
892
893DROP TABLE IF EXISTS wcf1_package_installation_file_log;
894CREATE TABLE wcf1_package_installation_file_log (
895 packageID INT(10),
a2bdc5f8 896 filename VARBINARY(765) NOT NULL, -- VARBINARY(765) roughly equals VARCHAR(255)
1e895431
AE
897 application VARCHAR(20) NOT NULL,
898 UNIQUE KEY applicationFile (application, filename)
158bd3ca
TD
899);
900
901DROP TABLE IF EXISTS wcf1_package_installation_form;
902CREATE TABLE wcf1_package_installation_form (
903 queueID INT(10) NOT NULL,
904 formName VARCHAR(80) NOT NULL DEFAULT '',
1e895431
AE
905 document TEXT NOT NULL,
906 UNIQUE KEY formDocument (queueID, formName)
158bd3ca
TD
907);
908
909DROP TABLE IF EXISTS wcf1_package_installation_node;
910CREATE TABLE wcf1_package_installation_node (
911 queueID INT(10) NOT NULL,
912 processNo INT(10) NOT NULL DEFAULT 0,
913 sequenceNo SMALLINT(4) NOT NULL DEFAULT 0,
914 node CHAR(8) NOT NULL DEFAULT '',
915 parentNode CHAR(8) NOT NULL DEFAULT '',
456008db 916 nodeType ENUM('optionalPackages','package', 'pip') NOT NULL DEFAULT 'package',
158bd3ca
TD
917 nodeData TEXT NOT NULL,
918 done TINYINT(1) NOT NULL DEFAULT 0
919);
920
921DROP TABLE IF EXISTS wcf1_package_installation_plugin;
922CREATE TABLE wcf1_package_installation_plugin (
a2bdc5f8 923 pluginName VARCHAR(191) NOT NULL PRIMARY KEY,
158bd3ca
TD
924 packageID INT(10),
925 priority TINYINT(1) NOT NULL DEFAULT 0,
926 className VARCHAR(255) NOT NULL
927);
928
929DROP TABLE IF EXISTS wcf1_package_installation_queue;
930CREATE TABLE wcf1_package_installation_queue (
931 queueID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
932 parentQueueID INT(10) NOT NULL DEFAULT 0,
933 processNo INT(10) NOT NULL DEFAULT 0,
934 userID INT(10) NOT NULL,
935 package VARCHAR(255) NOT NULL DEFAULT '',
936 packageName VARCHAR(255) NOT NULL DEFAULT '',
937 packageID INT(10),
938 archive VARCHAR(255) NOT NULL DEFAULT '',
17221357 939 action ENUM('install', 'update', 'uninstall') NOT NULL DEFAULT 'install',
158bd3ca 940 done TINYINT(1) NOT NULL DEFAULT 0,
b33c97d2 941 isApplication TINYINT(1) NOT NULL DEFAULT 0
158bd3ca
TD
942);
943
059bcdba 944/* The table `wcf1_package_installation_sql_log` can be found at the very top! */
158bd3ca 945
1b4f5112
AE
946/* SQL_PARSER_OFFSET */
947
158bd3ca
TD
948DROP TABLE IF EXISTS wcf1_package_requirement;
949CREATE TABLE wcf1_package_requirement (
950 packageID INT(10) NOT NULL,
1e895431
AE
951 requirement INT(10) NOT NULL,
952 UNIQUE KEY packageID (packageID, requirement)
158bd3ca
TD
953);
954
158bd3ca
TD
955DROP TABLE IF EXISTS wcf1_package_update;
956CREATE TABLE wcf1_package_update (
957 packageUpdateID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
958 packageUpdateServerID INT(10) NOT NULL,
a2bdc5f8 959 package VARCHAR(191) NOT NULL DEFAULT '',
158bd3ca
TD
960 packageName VARCHAR(255) NOT NULL DEFAULT '',
961 packageDescription VARCHAR(255) NOT NULL DEFAULT '',
962 author VARCHAR(255) NOT NULL DEFAULT '',
963 authorURL VARCHAR(255) NOT NULL DEFAULT '',
1e895431 964 isApplication TINYINT(1) NOT NULL DEFAULT 0,
7d547f61 965 pluginStoreFileID INT(10) NOT NULL DEFAULT 0,
1e895431 966 UNIQUE KEY packageUpdateServerID (packageUpdateServerID, package)
158bd3ca
TD
967);
968
89484ba0
AE
969DROP TABLE IF EXISTS wcf1_package_update_compatibility;
970CREATE TABLE wcf1_package_update_compatibility (
971 packageUpdateVersionID INT(10) NOT NULL,
972 version SMALLINT(4) NOT NULL,
973 UNIQUE KEY compatibleVersion (packageUpdateVersionID, version)
974);
975
158bd3ca
TD
976DROP TABLE IF EXISTS wcf1_package_update_exclusion;
977CREATE TABLE wcf1_package_update_exclusion (
978 packageUpdateVersionID INT(10) NOT NULL,
a2bdc5f8 979 excludedPackage VARCHAR(191) NOT NULL DEFAULT '',
1e895431
AE
980 excludedPackageVersion VARCHAR(255) NOT NULL DEFAULT '',
981 UNIQUE KEY packageUpdateVersionID (packageUpdateVersionID, excludedPackage)
158bd3ca
TD
982);
983
984DROP TABLE IF EXISTS wcf1_package_update_fromversion;
985CREATE TABLE wcf1_package_update_fromversion (
986 packageUpdateVersionID INT(10) NOT NULL DEFAULT 0,
1e895431
AE
987 fromversion VARCHAR(50) NOT NULL DEFAULT '',
988 UNIQUE KEY packageUpdateVersionID (packageUpdateVersionID, fromversion)
158bd3ca
TD
989);
990
411d6f1a
AE
991DROP TABLE IF EXISTS wcf1_package_update_optional;
992CREATE TABLE wcf1_package_update_optional (
993 packageUpdateVersionID INT(10) NOT NULL DEFAULT 0,
994 package VARCHAR(255) NOT NULL DEFAULT ''
995);
996
158bd3ca
TD
997DROP TABLE IF EXISTS wcf1_package_update_requirement;
998CREATE TABLE wcf1_package_update_requirement (
999 packageUpdateVersionID INT(10) NOT NULL,
a2bdc5f8 1000 package VARCHAR(191) NOT NULL DEFAULT '',
1e895431
AE
1001 minversion VARCHAR(50) NOT NULL DEFAULT '',
1002 UNIQUE KEY packageUpdateVersionID (packageUpdateVersionID, package)
158bd3ca
TD
1003);
1004
1005DROP TABLE IF EXISTS wcf1_package_update_server;
1006CREATE TABLE wcf1_package_update_server (
1007 packageUpdateServerID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1008 serverURL VARCHAR(255) NOT NULL DEFAULT '',
1009 loginUsername VARCHAR(255) NOT NULL DEFAULT '',
1010 loginPassword VARCHAR(255) NOT NULL DEFAULT '',
8f08c7d0 1011 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
158bd3ca
TD
1012 lastUpdateTime INT(10) NOT NULL DEFAULT 0,
1013 status ENUM('online', 'offline') NOT NULL DEFAULT 'online',
2c49099b 1014 errorMessage TEXT,
7d547f61 1015 apiVersion ENUM('2.0', '2.1', '3.1') NOT NULL DEFAULT '2.0',
b1701dd0 1016 metaData TEXT
158bd3ca
TD
1017);
1018
1019DROP TABLE IF EXISTS wcf1_package_update_version;
1020CREATE TABLE wcf1_package_update_version (
1021 packageUpdateVersionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1022 packageUpdateID INT(10) NOT NULL,
1023 packageVersion VARCHAR(50) NOT NULL DEFAULT '',
158bd3ca
TD
1024 packageDate INT(10) NOT NULL DEFAULT 0,
1025 filename VARCHAR(255) NOT NULL DEFAULT '',
411d6f1a
AE
1026 license VARCHAR(255) NOT NULL DEFAULT '',
1027 licenseURL VARCHAR(255) NOT NULL DEFAULT '',
b4f1ea02 1028 isAccessible TINYINT(1) NOT NULL DEFAULT 1,
1e895431 1029 UNIQUE KEY packageUpdateID (packageUpdateID, packageVersion)
158bd3ca
TD
1030);
1031
0bdb3cdf
MW
1032DROP TABLE IF EXISTS wcf1_page;
1033CREATE TABLE wcf1_page (
1034 pageID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1035 parentPageID INT(10),
a0fdb136 1036 identifier VARCHAR(255) NOT NULL,
c8b05efe 1037 name VARCHAR(255) NOT NULL,
3fd6b125 1038 pageType VARCHAR(255) NOT NULL,
0bdb3cdf
MW
1039 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
1040 isLandingPage TINYINT(1) NOT NULL DEFAULT 0,
1041 isMultilingual TINYINT(1) NOT NULL DEFAULT 0,
1042 originIsSystem TINYINT(1) NOT NULL DEFAULT 0,
1043 packageID INT(10) NOT NULL,
19dadfda 1044 applicationPackageID INT(10),
0bdb3cdf 1045 controller VARCHAR(255) NOT NULL DEFAULT '',
72604b0d 1046 handler VARCHAR(255) NOT NULL DEFAULT '',
0bdb3cdf 1047 controllerCustomURL VARCHAR(255) NOT NULL DEFAULT '',
86dbae33 1048 requireObjectID TINYINT(1) NOT NULL DEFAULT 0,
c80a99d3 1049 hasFixedParent TINYINT(1) NOT NULL DEFAULT 0,
afba9daf 1050 lastUpdateTime INT(10) NOT NULL DEFAULT 0,
15a7795e 1051 cssClassName VARCHAR(255) NOT NULL DEFAULT '',
110ca2e7 1052 availableDuringOfflineMode TINYINT(1) NOT NULL DEFAULT 0,
92608257 1053 allowSpidersToIndex TINYINT(1) NOT NULL DEFAULT 0,
d9fa555f 1054 excludeFromLandingPage TINYINT(1) NOT NULL DEFAULT 0,
95230ff4 1055 enableShareButtons TINYINT(1) NOT NULL DEFAULT 0,
afba9daf
MW
1056 permissions TEXT NULL,
1057 options TEXT NULL
0bdb3cdf
MW
1058);
1059
5b85fc64
AE
1060DROP TABLE IF EXISTS wcf1_page_box_order;
1061CREATE TABLE wcf1_page_box_order (
1062 pageID INT(10) NOT NULL,
1063 boxID INT(10) NOT NULL,
1064 showOrder INT(10) NOT NULL DEFAULT 0,
1065 UNIQUE KEY pageToBox (pageID, boxID)
1066);
1067
0bdb3cdf
MW
1068DROP TABLE IF EXISTS wcf1_page_content;
1069CREATE TABLE wcf1_page_content (
2f273839 1070 pageContentID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
0bdb3cdf
MW
1071 pageID INT(10) NOT NULL,
1072 languageID INT(10),
1073 title VARCHAR(255) NOT NULL,
1074 content MEDIUMTEXT,
1075 metaDescription TEXT,
1076 metaKeywords TEXT,
1077 customURL VARCHAR(255) NOT NULL,
2f273839
MW
1078 hasEmbeddedObjects TINYINT(1) NOT NULL DEFAULT 0,
1079
fe851d2a 1080 UNIQUE KEY (pageID, languageID)
0bdb3cdf
MW
1081);
1082
4d8036f5
MW
1083DROP TABLE IF EXISTS wcf1_paid_subscription;
1084CREATE TABLE wcf1_paid_subscription (
1085 subscriptionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1086 title VARCHAR(255) NOT NULL DEFAULT '',
1087 description TEXT,
1088 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
1089 showOrder INT(10) NOT NULL DEFAULT 0,
1090 cost DECIMAL(10,2) NOT NULL DEFAULT 0,
1091 currency VARCHAR(3) NOT NULL DEFAULT 'EUR',
1092 subscriptionLength SMALLINT(3) NOT NULL DEFAULT 0,
1093 subscriptionLengthUnit ENUM('', 'D', 'M', 'Y') NOT NULL DEFAULT '',
1094 isRecurring TINYINT(1) NOT NULL DEFAULT 0,
1095 groupIDs TEXT,
1096 excludedSubscriptionIDs TEXT
1097);
1098
1099DROP TABLE IF EXISTS wcf1_paid_subscription_user;
1100CREATE TABLE wcf1_paid_subscription_user (
1101 subscriptionUserID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1102 subscriptionID INT(10) NOT NULL,
1103 userID INT(10) NOT NULL,
1104 startDate INT(10) NOT NULL DEFAULT 0,
1105 endDate INT(10) NOT NULL DEFAULT 0,
1106 isActive TINYINT(1) NOT NULL DEFAULT 1,
4b120958 1107 sentExpirationNotification TINYINT(1) NOT NULL DEFAULT 0,
4d8036f5
MW
1108
1109 UNIQUE KEY (subscriptionID, userID),
1110 KEY (isActive)
1111);
1112
1113DROP TABLE IF EXISTS wcf1_paid_subscription_transaction_log;
1114CREATE TABLE wcf1_paid_subscription_transaction_log (
1115 logID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1116 subscriptionUserID INT(10),
1117 userID INT(10),
1118 subscriptionID INT(10),
1119 paymentMethodObjectTypeID INT(10) NOT NULL,
1120 logTime INT(10) NOT NULL DEFAULT 0,
1121 transactionID VARCHAR(255) NOT NULL DEFAULT '',
1122 transactionDetails MEDIUMTEXT,
1123 logMessage VARCHAR(255) NOT NULL DEFAULT ''
1124);
1125
e25b7b61
MW
1126DROP TABLE IF EXISTS wcf1_poll;
1127CREATE TABLE wcf1_poll (
1128 pollID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1129 objectTypeID INT(10) NOT NULL,
1130 objectID INT(10) NOT NULL DEFAULT 0,
1131 question VARCHAR(255) DEFAULT '',
1132 time INT(10) NOT NULL DEFAULT 0,
1133 endTime INT(10) NOT NULL DEFAULT 0,
1134 isChangeable TINYINT(1) NOT NULL DEFAULT 0,
1135 isPublic TINYINT(1) NOT NULL DEFAULT 0,
1136 sortByVotes TINYINT(1) NOT NULL DEFAULT 0,
1137 resultsRequireVote TINYINT(1) NOT NULL DEFAULT 0,
1138 maxVotes INT(10) NOT NULL DEFAULT 1,
1139 votes INT(10) NOT NULL DEFAULT 0
1140);
1141
1142DROP TABLE IF EXISTS wcf1_poll_option;
1143CREATE TABLE wcf1_poll_option (
1144 optionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1145 pollID INT(10) NOT NULL,
1146 optionValue VARCHAR(255) NOT NULL DEFAULT '',
1147 votes INT(10) NOT NULL DEFAULT 0,
1148 showOrder INT(10) NOT NULL DEFAULT 0
1149);
1150
1151DROP TABLE IF EXISTS wcf1_poll_option_vote;
1152CREATE TABLE wcf1_poll_option_vote (
1153 pollID INT(10) NOT NULL,
1154 optionID INT(10) NOT NULL,
1155 userID INT(10) NOT NULL,
1156
1157 KEY (optionID, userID),
1158 UNIQUE KEY vote (pollID, optionID, userID)
1159);
1160
16755167
JR
1161DROP TABLE IF EXISTS wcf1_reaction_type;
1162CREATE TABLE wcf1_reaction_type(
1163 reactionTypeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
7df18cf7 1164 title VARCHAR(255),
1974fc3e 1165 type TINYINT(1),
16755167 1166 showOrder INT(10) NOT NULL DEFAULT 0,
91c72fa8 1167 iconFile MEDIUMTEXT,
16755167
JR
1168 isDisabled TINYINT(1) NOT NULL DEFAULT 0
1169);
1170
11117cd5
AE
1171DROP TABLE IF EXISTS wcf1_registry;
1172CREATE TABLE wcf1_registry (
1173 packageID INT(10) NOT NULL,
1174 field VARCHAR(191) NOT NULL,
1175 fieldValue MEDIUMTEXT,
1176
1177 UNIQUE KEY uniqueField (packageID, field)
1178);
1179
158bd3ca
TD
1180DROP TABLE IF EXISTS wcf1_search;
1181CREATE TABLE wcf1_search (
1182 searchID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1183 userID INT(10),
1184 searchData MEDIUMTEXT NOT NULL,
1185 searchTime INT(10) NOT NULL DEFAULT 0,
1186 searchType VARCHAR(255) NOT NULL DEFAULT '',
1187 searchHash CHAR(40) NOT NULL DEFAULT '',
1188 KEY searchHash (searchHash)
1189);
1190
749cca08
MW
1191DROP TABLE IF EXISTS wcf1_search_keyword;
1192CREATE TABLE wcf1_search_keyword (
1193 keywordID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
a2bdc5f8 1194 keyword VARCHAR(191) NOT NULL,
749cca08
MW
1195 searches INT(10) NOT NULL DEFAULT 0,
1196 lastSearchTime INT(10) NOT NULL DEFAULT 0,
1e895431 1197 UNIQUE KEY (keyword),
749cca08
MW
1198 KEY (searches, lastSearchTime)
1199);
1200
158bd3ca
TD
1201DROP TABLE IF EXISTS wcf1_session;
1202CREATE TABLE wcf1_session (
1203 sessionID CHAR(40) NOT NULL PRIMARY KEY,
158bd3ca
TD
1204 userID INT(10),
1205 ipAddress VARCHAR(39) NOT NULL DEFAULT '',
a2bdc5f8 1206 userAgent VARCHAR(191) NOT NULL DEFAULT '',
158bd3ca
TD
1207 lastActivityTime INT(10) NOT NULL DEFAULT 0,
1208 requestURI VARCHAR(255) NOT NULL DEFAULT '',
98f447b0 1209 requestMethod VARCHAR(7) NOT NULL DEFAULT '',
da5a61fb
MW
1210 pageID INT(10),
1211 pageObjectID INT(10),
1212 parentPageID INT(10),
1213 parentPageObjectID INT(10),
e8d26212 1214 spiderID INT(10),
5c4282aa 1215 sessionVariables MEDIUMTEXT,
46dd7463 1216 KEY packageID (lastActivityTime, spiderID),
da5a61fb
MW
1217 KEY pageID (pageID, pageObjectID),
1218 KEY parentPageID (parentPageID, parentPageObjectID),
6a0a959c 1219 UNIQUE KEY uniqueUserID (userID)
158bd3ca
TD
1220);
1221
5a05fde9
AE
1222DROP TABLE IF EXISTS wcf1_session_virtual;
1223CREATE TABLE wcf1_session_virtual (
d905faf6 1224 virtualSessionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
5a05fde9
AE
1225 sessionID CHAR(40) NOT NULL,
1226 ipAddress VARCHAR(39) NOT NULL DEFAULT '',
a2bdc5f8 1227 userAgent VARCHAR(191) NOT NULL DEFAULT '',
5a05fde9
AE
1228 lastActivityTime INT(10) NOT NULL DEFAULT 0,
1229 UNIQUE KEY (sessionID, ipAddress, userAgent)
1230);
1231
dcc2332d
MW
1232DROP TABLE IF EXISTS wcf1_smiley;
1233CREATE TABLE wcf1_smiley (
1234 smileyID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1235 packageID INT(10) NOT NULL,
1236 categoryID INT(10),
1237 smileyPath VARCHAR(255) NOT NULL DEFAULT '',
d4da0d92 1238 smileyPath2x VARCHAR(255) NOT NULL DEFAULT '',
dcc2332d 1239 smileyTitle VARCHAR(255) NOT NULL DEFAULT '',
a2bdc5f8 1240 smileyCode VARCHAR(191) NOT NULL DEFAULT '',
dcc2332d 1241 aliases TEXT NOT NULL,
1e895431
AE
1242 showOrder INT(10) NOT NULL DEFAULT 0,
1243 UNIQUE KEY smileyCode (smileyCode)
dcc2332d
MW
1244);
1245
158bd3ca
TD
1246DROP TABLE IF EXISTS wcf1_spider;
1247CREATE TABLE wcf1_spider (
1248 spiderID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
a2bdc5f8 1249 spiderIdentifier VARCHAR(191) DEFAULT '',
158bd3ca
TD
1250 spiderName VARCHAR(255) DEFAULT '',
1251 spiderURL VARCHAR(255) DEFAULT '',
1252 UNIQUE KEY spiderIdentifier (spiderIdentifier)
1253);
1254
891de7a0
MW
1255DROP TABLE IF EXISTS wcf1_stat_daily;
1256CREATE TABLE wcf1_stat_daily (
e1fe9453 1257 statID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
891de7a0
MW
1258 objectTypeID INT(10) NOT NULL,
1259 date DATE NOT NULL,
1260 counter INT(10) NOT NULL DEFAULT 0,
1261 total INT(10) NOT NULL DEFAULT 0,
1262
1263 UNIQUE KEY (objectTypeID, date)
1264);
1265
158bd3ca
TD
1266DROP TABLE IF EXISTS wcf1_style;
1267CREATE TABLE wcf1_style (
1268 styleID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1269 packageID INT(10) NOT NULL,
1270 styleName VARCHAR(255) NOT NULL DEFAULT '',
1271 templateGroupID INT(10) NOT NULL DEFAULT 0,
1272 isDefault TINYINT(1) NOT NULL DEFAULT 0,
8f08c7d0 1273 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
d3478df7 1274 styleDescription VARCHAR(30) NOT NULL DEFAULT '',
158bd3ca
TD
1275 styleVersion VARCHAR(255) NOT NULL DEFAULT '',
1276 styleDate CHAR(10) NOT NULL DEFAULT '0000-00-00',
1277 image VARCHAR(255) NOT NULL DEFAULT '',
2e572b29 1278 image2x VARCHAR(255) NOT NULL DEFAULT '',
158bd3ca
TD
1279 copyright VARCHAR(255) NOT NULL DEFAULT '',
1280 license VARCHAR(255) NOT NULL DEFAULT '',
1281 authorName VARCHAR(255) NOT NULL DEFAULT '',
fa83e8f7 1282 authorURL VARCHAR(255) NOT NULL DEFAULT '',
90b4b964
AE
1283 imagePath VARCHAR(255) NOT NULL DEFAULT '',
1284 packageName VARCHAR(255) NOT NULL DEFAULT '',
aef117b5 1285 isTainted TINYINT(1) NOT NULL DEFAULT 0,
811f5a93 1286 hasFavicon TINYINT(1) NOT NULL DEFAULT 0,
87fc5501 1287 coverPhotoExtension VARCHAR(4) NOT NULL DEFAULT '',
e18150ab 1288 apiVersion ENUM('3.0', '3.1') NOT NULL DEFAULT '3.0'
158bd3ca
TD
1289);
1290
158bd3ca
TD
1291DROP TABLE IF EXISTS wcf1_style_variable;
1292CREATE TABLE wcf1_style_variable (
4d9f6058
AE
1293 variableID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1294 variableName VARCHAR(50) NOT NULL,
1e895431
AE
1295 defaultValue MEDIUMTEXT,
1296 UNIQUE KEY variableName (variableName)
158bd3ca
TD
1297);
1298
4d9f6058
AE
1299DROP TABLE IF EXISTS wcf1_style_variable_value;
1300CREATE TABLE wcf1_style_variable_value (
158bd3ca 1301 styleID INT(10) NOT NULL,
4d9f6058 1302 variableID INT(10) NOT NULL,
158bd3ca 1303 variableValue MEDIUMTEXT,
4d9f6058 1304 UNIQUE KEY (styleID, variableID)
158bd3ca
TD
1305);
1306
04c06e85
MW
1307DROP TABLE IF EXISTS wcf1_tag;
1308CREATE TABLE wcf1_tag (
1309 tagID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1310 languageID INT(10) NOT NULL DEFAULT 0,
a2bdc5f8 1311 name VARCHAR(191) NOT NULL,
1e895431
AE
1312 synonymFor INT(10),
1313 UNIQUE KEY (languageID, name)
04c06e85
MW
1314);
1315
1316DROP TABLE IF EXISTS wcf1_tag_to_object;
1317CREATE TABLE wcf1_tag_to_object (
1318 objectID INT(10) NOT NULL,
1319 tagID INT(10) NOT NULL,
1320 objectTypeID INT(10) NOT NULL,
1321 languageID INT(10) NOT NULL,
1322 UNIQUE KEY (objectTypeID, languageID, objectID, tagID),
1323 KEY (objectTypeID, languageID, tagID),
1324 KEY (tagID, objectTypeID)
1325);
1326
158bd3ca
TD
1327DROP TABLE IF EXISTS wcf1_template;
1328CREATE TABLE wcf1_template (
1329 templateID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1330 packageID INT(10) NOT NULL,
a2bdc5f8 1331 templateName VARCHAR(191) NOT NULL,
567fa8b8 1332 application VARCHAR(20) NOT NULL,
158bd3ca 1333 templateGroupID INT(10),
6570e38e 1334 lastModificationTime INT(10) NOT NULL DEFAULT 0,
1e895431 1335 UNIQUE KEY applicationTemplate (application, templateGroupID, templateName),
158bd3ca
TD
1336 KEY templateGroupID (packageID, templateGroupID, templateName)
1337);
1338
1339DROP TABLE IF EXISTS wcf1_template_group;
1340CREATE TABLE wcf1_template_group (
1341 templateGroupID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
6570e38e 1342 parentTemplateGroupID INT(10),
158bd3ca
TD
1343 templateGroupName VARCHAR(255) NOT NULL DEFAULT '',
1344 templateGroupFolderName VARCHAR(255) NOT NULL DEFAULT ''
1345);
1346
0a67f96c
MS
1347DROP TABLE IF EXISTS wcf1_template_listener;
1348CREATE TABLE wcf1_template_listener (
1349 listenerID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1350 packageID INT(10) NOT NULL,
1351 name VARCHAR(80) NOT NULL DEFAULT '',
1352 environment ENUM('user','admin') NOT NULL DEFAULT 'user',
1353 templateName VARCHAR(80) NOT NULL DEFAULT '',
1354 eventName VARCHAR(50) NOT NULL DEFAULT '',
1355 templateCode TEXT NOT NULL,
da84cf75 1356 niceValue TINYINT(3) NOT NULL DEFAULT 0,
512b7176
MS
1357 permissions TEXT,
1358 options TEXT,
1359
0a67f96c
MS
1360 KEY templateName (environment, templateName)
1361);
1362
059bcdba
AE
1363/* SQL_PARSER_OFFSET */
1364
320f4a6d
MW
1365DROP TABLE IF EXISTS wcf1_tracked_visit;
1366CREATE TABLE wcf1_tracked_visit (
1367 objectTypeID INT(10) NOT NULL,
1368 objectID INT(10) NOT NULL,
1369 userID INT(10) NOT NULL,
1370 visitTime INT(10) NOT NULL DEFAULT 0,
1371 UNIQUE KEY (objectTypeID, objectID, userID),
1372 KEY (userID, visitTime)
1373);
1374
1375DROP TABLE IF EXISTS wcf1_tracked_visit_type;
1376CREATE TABLE wcf1_tracked_visit_type (
1377 objectTypeID INT(10) NOT NULL,
1378 userID INT(10) NOT NULL,
1379 visitTime INT(10) NOT NULL DEFAULT 0,
1380 UNIQUE KEY (objectTypeID, userID),
1381 KEY (userID, visitTime)
1382);
1383
704e0423
JR
1384DROP TABLE IF EXISTS wcf1_trophy;
1385CREATE TABLE wcf1_trophy(
1386 trophyID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1387 title VARCHAR(255),
1388 description MEDIUMTEXT,
1389 categoryID INT(10) NOT NULL,
704e0423
JR
1390 type SMALLINT(1) DEFAULT 1,
1391 iconFile MEDIUMTEXT,
1392 iconName VARCHAR(255),
1393 iconColor VARCHAR(255),
704e0423 1394 badgeColor VARCHAR(255),
704e0423 1395 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
d8b47ff1 1396 awardAutomatically TINYINT(1) NOT NULL DEFAULT 0,
b5be45d7 1397 trophyUseHtml TINYINT(1) NOT NULL DEFAULT 0,
2126bf5e 1398 showOrder INT(10) NOT NULL DEFAULT 0,
704e0423
JR
1399 KEY(categoryID)
1400);
1401
158bd3ca
TD
1402DROP TABLE IF EXISTS wcf1_user;
1403CREATE TABLE wcf1_user (
1404 userID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
692a0b49 1405 username VARCHAR(100) NOT NULL DEFAULT '',
746ffe3b 1406 email VARCHAR(191) NOT NULL DEFAULT '',
4e273b1f 1407 password VARCHAR(100) NOT NULL DEFAULT '',
6a41a21e 1408 accessToken CHAR(40) NOT NULL DEFAULT '',
158bd3ca
TD
1409 languageID INT(10) NOT NULL DEFAULT 0,
1410 registrationDate INT(10) NOT NULL DEFAULT 0,
1411 styleID INT(10) NOT NULL DEFAULT 0,
b1356a27
MW
1412 banned TINYINT(1) NOT NULL DEFAULT 0,
1413 banReason MEDIUMTEXT NULL,
f034d0ec 1414 banExpires INT(10) NOT NULL DEFAULT 0,
320f4a6d
MW
1415 activationCode INT(10) NOT NULL DEFAULT 0,
1416 lastLostPasswordRequestTime INT(10) NOT NULL DEFAULT 0,
5f6542f1 1417 lostPasswordKey CHAR(40) DEFAULT NULL,
320f4a6d
MW
1418 lastUsernameChange INT(10) NOT NULL DEFAULT 0,
1419 newEmail VARCHAR(255) NOT NULL DEFAULT '',
1420 oldUsername VARCHAR(255) NOT NULL DEFAULT '',
1421 quitStarted INT(10) NOT NULL DEFAULT 0,
1422 reactivationCode INT(10) NOT NULL DEFAULT 0,
1423 registrationIpAddress VARCHAR(39) NOT NULL DEFAULT '',
1424 avatarID INT(10),
1425 disableAvatar TINYINT(1) NOT NULL DEFAULT 0,
1426 disableAvatarReason TEXT,
f034d0ec 1427 disableAvatarExpires INT(10) NOT NULL DEFAULT 0,
320f4a6d 1428 enableGravatar TINYINT(1) NOT NULL DEFAULT 0,
4ae7fdc1 1429 gravatarFileExtension VARCHAR(3) NOT NULL DEFAULT '',
320f4a6d 1430 signature TEXT,
320f4a6d 1431 signatureEnableHtml TINYINT(1) NOT NULL DEFAULT 0,
320f4a6d
MW
1432 disableSignature TINYINT(1) NOT NULL DEFAULT 0,
1433 disableSignatureReason TEXT,
f034d0ec 1434 disableSignatureExpires INT(10) NOT NULL DEFAULT 0,
320f4a6d
MW
1435 lastActivityTime INT(10) NOT NULL DEFAULT 0,
1436 profileHits INT(10) NOT NULL DEFAULT 0,
1437 rankID INT(10),
1438 userTitle VARCHAR(255) NOT NULL DEFAULT '',
1439 userOnlineGroupID INT(10),
1440 activityPoints INT(10) NOT NULL DEFAULT 0,
1441 notificationMailToken VARCHAR(20) NOT NULL DEFAULT '',
746ffe3b 1442 authData VARCHAR(191) NOT NULL DEFAULT '',
00b6f956 1443 likesReceived MEDIUMINT(7) NOT NULL DEFAULT 0,
16977ca6 1444 trophyPoints INT(10) NOT NULL DEFAULT 0,
e26331e1
AE
1445 coverPhotoHash CHAR(40) DEFAULT NULL,
1446 coverPhotoExtension VARCHAR(4) NOT NULL DEFAULT '',
1447 disableCoverPhoto TINYINT(1) NOT NULL DEFAULT 0,
9fdd2995 1448 disableCoverPhotoReason TEXT,
e26331e1 1449 disableCoverPhotoExpires INT(10) NOT NULL DEFAULT 0,
bd1067ab 1450 articles INT(10) NOT NULL DEFAULT 0,
3f479bff
JR
1451 positiveReactionsReceived MEDIUMINT(7) NOT NULL DEFAULT 0,
1452 negativeReactionsReceived MEDIUMINT(7) NOT NULL DEFAULT 0,
1453 neutralReactionsReceived MEDIUMINT(7) NOT NULL DEFAULT 0,
158bd3ca
TD
1454
1455 KEY username (username),
718bdb12 1456 KEY email (email),
158bd3ca 1457 KEY registrationDate (registrationDate),
320f4a6d
MW
1458 KEY styleID (styleID),
1459 KEY activationCode (activationCode),
1460 KEY registrationData (registrationIpAddress, registrationDate),
00b6f956 1461 KEY activityPoints (activityPoints),
e80b96ef 1462 KEY likesReceived (likesReceived),
3f479bff
JR
1463 KEY positiveReactionsReceived (positiveReactionsReceived),
1464 KEY negativeReactionsReceived (negativeReactionsReceived),
1465 KEY neutralReactionsReceived (neutralReactionsReceived),
16977ca6
JR
1466 KEY authData (authData),
1467 KEY trophyPoints (trophyPoints)
320f4a6d
MW
1468);
1469
1470DROP TABLE IF EXISTS wcf1_user_activity_event;
1471CREATE TABLE wcf1_user_activity_event (
1472 eventID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1473 objectTypeID INT(10) NOT NULL,
1474 objectID INT(10) NOT NULL,
1475 languageID INT(10),
1476 userID INT(10) NOT NULL,
1477 time INT(10) NOT NULL,
1478 additionalData TEXT,
1479
1480 KEY (time),
1481 KEY (userID, time),
1482 KEY (objectTypeID, objectID)
1483);
1484
1485DROP TABLE IF EXISTS wcf1_user_activity_point;
1486CREATE TABLE wcf1_user_activity_point (
1487 userID INT(10) NOT NULL,
1488 objectTypeID INT(10) NOT NULL,
1489 activityPoints INT(10) NOT NULL DEFAULT 0,
a16ee110 1490 items INT(10) NOT NULL DEFAULT 0,
320f4a6d
MW
1491 PRIMARY KEY (userID, objectTypeID),
1492 KEY (objectTypeID)
1493);
1494
359f3c53
MW
1495DROP TABLE IF EXISTS wcf1_user_authentication_failure;
1496CREATE TABLE wcf1_user_authentication_failure (
1497 failureID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1498 environment ENUM('user', 'admin') NOT NULL DEFAULT 'user',
1499 userID INT(10),
1500 username VARCHAR(255) NOT NULL DEFAULT '',
1501 time INT(10) NOT NULL DEFAULT 0,
1502 ipAddress VARCHAR(39) NOT NULL DEFAULT '',
1503 userAgent VARCHAR(255) NOT NULL DEFAULT '',
1504 KEY (ipAddress, time),
1505 KEY (time)
1506);
1507
320f4a6d
MW
1508DROP TABLE IF EXISTS wcf1_user_avatar;
1509CREATE TABLE wcf1_user_avatar (
1510 avatarID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1511 avatarName VARCHAR(255) NOT NULL DEFAULT '',
1512 avatarExtension VARCHAR(7) NOT NULL DEFAULT '',
1513 width SMALLINT(5) NOT NULL DEFAULT 0,
1514 height SMALLINT(5) NOT NULL DEFAULT 0,
1515 userID INT(10),
2772d4eb 1516 fileHash VARCHAR(40) NOT NULL DEFAULT ''
158bd3ca
TD
1517);
1518
a8e8aa21
AE
1519DROP TABLE IF EXISTS wcf1_user_collapsible_content;
1520CREATE TABLE wcf1_user_collapsible_content (
1521 objectTypeID INT(10) NOT NULL,
a2bdc5f8 1522 objectID VARCHAR(191) NOT NULL,
a8e8aa21
AE
1523 userID INT(10) NOT NULL,
1524 UNIQUE KEY (objectTypeID, objectID, userID)
1525);
1526
320f4a6d
MW
1527DROP TABLE IF EXISTS wcf1_user_follow;
1528CREATE TABLE wcf1_user_follow (
1529 followID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1530 userID INT(10) NOT NULL,
1531 followUserID INT(10) NOT NULL,
1532 time INT(10) NOT NULL DEFAULT 0,
1533 UNIQUE KEY (userID, followUserID)
1534);
1535
158bd3ca
TD
1536DROP TABLE IF EXISTS wcf1_user_group;
1537CREATE TABLE wcf1_user_group (
1538 groupID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1539 groupName VARCHAR(255) NOT NULL DEFAULT '',
005f6926 1540 groupDescription TEXT,
320f4a6d
MW
1541 groupType TINYINT(1) NOT NULL DEFAULT 4,
1542 priority MEDIUMINT(8) NOT NULL DEFAULT 0,
1543 userOnlineMarking VARCHAR(255) NOT NULL DEFAULT '%s',
1544 showOnTeamPage TINYINT(1) NOT NULL DEFAULT 0
158bd3ca
TD
1545);
1546
87d3a054
MS
1547DROP TABLE IF EXISTS wcf1_user_group_assignment;
1548CREATE TABLE wcf1_user_group_assignment (
1549 assignmentID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1550 groupID INT(10) NOT NULL,
1551 title VARCHAR(255) NOT NULL,
1552 isDisabled TINYINT(1) NOT NULL DEFAULT 0
1553);
1554
158bd3ca 1555DROP TABLE IF EXISTS wcf1_user_group_option;
01bd2eff 1556CREATE TABLE wcf1_user_group_option (
158bd3ca
TD
1557 optionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1558 packageID INT(10),
a2bdc5f8
AE
1559 optionName VARCHAR(191) NOT NULL DEFAULT '',
1560 categoryName VARCHAR(191) NOT NULL DEFAULT '',
158bd3ca
TD
1561 optionType VARCHAR(255) NOT NULL DEFAULT '',
1562 defaultValue MEDIUMTEXT,
158bd3ca
TD
1563 validationPattern TEXT,
1564 enableOptions MEDIUMTEXT,
1565 showOrder INT(10) NOT NULL DEFAULT 0,
1566 permissions TEXT,
1567 options TEXT,
ae6b590f 1568 usersOnly TINYINT(1) NOT NULL DEFAULT 0,
1e895431
AE
1569 additionalData MEDIUMTEXT,
1570 UNIQUE KEY optionName (optionName, packageID)
158bd3ca
TD
1571);
1572
1573DROP TABLE IF EXISTS wcf1_user_group_option_category;
1574CREATE TABLE wcf1_user_group_option_category (
1575 categoryID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1576 packageID INT(10) NOT NULL,
a2bdc5f8
AE
1577 categoryName VARCHAR(191) NOT NULL DEFAULT '',
1578 parentCategoryName VARCHAR(191) NOT NULL DEFAULT '',
158bd3ca
TD
1579 showOrder INT(10) NOT NULL DEFAULT 0,
1580 permissions TEXT,
1e895431
AE
1581 options TEXT,
1582 UNIQUE KEY categoryName (categoryName)
158bd3ca
TD
1583);
1584
1585DROP TABLE IF EXISTS wcf1_user_group_option_value;
01bd2eff 1586CREATE TABLE wcf1_user_group_option_value (
158bd3ca
TD
1587 groupID INT(10) NOT NULL,
1588 optionID INT(10) NOT NULL,
1589 optionValue MEDIUMTEXT NOT NULL,
1590 UNIQUE KEY groupID (groupID, optionID)
1591);
1592
320f4a6d
MW
1593DROP TABLE IF EXISTS wcf1_user_ignore;
1594CREATE TABLE wcf1_user_ignore (
1595 ignoreID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1596 userID INT(10) NOT NULL,
1597 ignoreUserID INT(10) NOT NULL,
1598 time INT(10) NOT NULL DEFAULT 0,
1599 UNIQUE KEY (userID, ignoreUserID)
1600);
1601
a83d788a
JR
1602DROP TABLE IF EXISTS wcf1_user_special_trophy;
1603CREATE TABLE wcf1_user_special_trophy(
1604 trophyID INT(10) NOT NULL,
1605 userID INT(10) NOT NULL,
1606 UNIQUE KEY (trophyID, userID)
1607);
1608
16977ca6
JR
1609DROP TABLE IF EXISTS wcf1_user_trophy;
1610CREATE TABLE wcf1_user_trophy(
1611 userTrophyID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1612 trophyID INT(10) NOT NULL,
1613 userID INT(10) NOT NULL,
1614 time INT(10) NOT NULL DEFAULT 0,
1615 description MEDIUMTEXT,
1616 useCustomDescription TINYINT(1) NOT NULL DEFAULT 0,
b5be45d7 1617 trophyUseHtml TINYINT(1) NOT NULL DEFAULT 0,
16977ca6
JR
1618 KEY(trophyID, time)
1619);
1620
320f4a6d
MW
1621DROP TABLE IF EXISTS wcf1_user_menu_item;
1622CREATE TABLE wcf1_user_menu_item (
1623 menuItemID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1624 packageID INT(10) NOT NULL,
a2bdc5f8
AE
1625 menuItem VARCHAR(191) NOT NULL DEFAULT '',
1626 parentMenuItem VARCHAR(191) NOT NULL DEFAULT '',
320f4a6d
MW
1627 menuItemController VARCHAR(255) NOT NULL DEFAULT '',
1628 menuItemLink VARCHAR(255) NOT NULL DEFAULT '',
1629 showOrder INT(10) NOT NULL DEFAULT 0,
1630 permissions TEXT,
1631 options TEXT,
1632 className VARCHAR(255) NOT NULL DEFAULT '',
1e895431
AE
1633 iconClassName VARCHAR(255) NOT NULL DEFAULT '',
1634 UNIQUE KEY menuItem (menuItem, packageID)
320f4a6d
MW
1635);
1636
1637-- notifications
1638DROP TABLE IF EXISTS wcf1_user_notification;
1639CREATE TABLE wcf1_user_notification (
1640 notificationID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
ed6a4e42 1641 packageID INT(10) NOT NULL,
320f4a6d
MW
1642 eventID INT(10) NOT NULL,
1643 objectID INT(10) NOT NULL DEFAULT 0,
ed6a4e42 1644 baseObjectID INT(10) NOT NULL DEFAULT 0,
68206b3f 1645 eventHash VARCHAR(40) NOT NULL DEFAULT '',
4341fcab 1646 authorID INT(10) NULL,
68206b3f 1647 timesTriggered INT(10) NOT NULL DEFAULT 0,
afb18fa2 1648 guestTimesTriggered INT(10) NOT NULL DEFAULT 0,
4341fcab 1649 userID INT(10) NOT NULL,
320f4a6d 1650 time INT(10) NOT NULL DEFAULT 0,
4341fcab 1651 mailNotified TINYINT(1) NOT NULL DEFAULT 0,
078256b5 1652 confirmTime INT(10) NOT NULL DEFAULT 0,
320f4a6d 1653 additionalData TEXT,
078256b5 1654 KEY (userID, eventID, objectID, confirmTime),
6efc4645
TD
1655 KEY (userID, confirmTime),
1656 KEY (confirmTime)
4341fcab
AE
1657);
1658
1659-- notification authors (stacking)
1660DROP TABLE IF EXISTS wcf1_user_notification_author;
1661CREATE TABLE wcf1_user_notification_author (
1662 notificationID INT(10) NOT NULL,
afb18fa2 1663 authorID INT(10),
4341fcab 1664 time INT(10) NOT NULL DEFAULT 0,
4341fcab 1665 UNIQUE KEY (notificationID, authorID)
320f4a6d
MW
1666);
1667
1668-- notification recipients
4341fcab 1669-- DEPRECATED
320f4a6d
MW
1670DROP TABLE IF EXISTS wcf1_user_notification_to_user;
1671CREATE TABLE wcf1_user_notification_to_user (
1672 notificationID INT(10) NOT NULL,
1673 userID INT(10) NOT NULL,
320f4a6d
MW
1674 UNIQUE KEY notificationID (notificationID, userID)
1675);
1676
1677-- events that create notifications
1678DROP TABLE IF EXISTS wcf1_user_notification_event;
1679CREATE TABLE wcf1_user_notification_event (
1680 eventID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1681 packageID INT(10) NOT NULL,
a2bdc5f8 1682 eventName VARCHAR(191) NOT NULL DEFAULT '',
320f4a6d
MW
1683 objectTypeID INT(10) NOT NULL,
1684 className VARCHAR(255) NOT NULL DEFAULT '',
1685 permissions TEXT,
1686 options TEXT,
2d7c568a 1687 preset TINYINT(1) NOT NULL DEFAULT 0,
1e895431
AE
1688 presetMailNotificationType ENUM('none', 'instant', 'daily') NOT NULL DEFAULT 'none',
1689 UNIQUE KEY eventName (eventName, objectTypeID)
320f4a6d
MW
1690);
1691
1692-- user configuration for events
1693DROP TABLE IF EXISTS wcf1_user_notification_event_to_user;
1694CREATE TABLE wcf1_user_notification_event_to_user (
1695 userID INT(10) NOT NULL,
1696 eventID INT(10) NOT NULL,
1697 mailNotificationType ENUM('none', 'instant', 'daily') NOT NULL DEFAULT 'none',
1698 UNIQUE KEY (eventID, userID)
1699);
1700
1701DROP TABLE IF EXISTS wcf1_user_object_watch;
1702CREATE TABLE wcf1_user_object_watch (
1703 watchID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1704 objectTypeID INT(10) NOT NULL,
1705 objectID INT(10) NOT NULL,
1706 userID INT(10) NOT NULL,
1707 notification TINYINT(1) NOT NULL DEFAULT 0,
1708
1709 UNIQUE KEY (objectTypeID, userID, objectID),
1710 KEY (objectTypeID, objectID)
1711);
1712
158bd3ca
TD
1713DROP TABLE IF EXISTS wcf1_user_option;
1714CREATE TABLE wcf1_user_option (
1715 optionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1716 packageID INT(10) NOT NULL,
a2bdc5f8
AE
1717 optionName VARCHAR(191) NOT NULL DEFAULT '',
1718 categoryName VARCHAR(191) NOT NULL DEFAULT '',
158bd3ca
TD
1719 optionType VARCHAR(255) NOT NULL DEFAULT '',
1720 defaultValue MEDIUMTEXT,
1721 validationPattern TEXT,
1722 selectOptions MEDIUMTEXT,
1723 enableOptions MEDIUMTEXT,
1724 required TINYINT(1) NOT NULL DEFAULT 0,
1725 askDuringRegistration TINYINT(1) NOT NULL DEFAULT 0,
1726 editable TINYINT(1) NOT NULL DEFAULT 0,
1727 visible TINYINT(1) NOT NULL DEFAULT 0,
1728 outputClass VARCHAR(255) NOT NULL DEFAULT '',
1729 searchable TINYINT(1) NOT NULL DEFAULT 0,
1730 showOrder INT(10) NOT NULL DEFAULT 0,
8f08c7d0 1731 isDisabled TINYINT(1) NOT NULL DEFAULT 0,
158bd3ca
TD
1732 permissions TEXT,
1733 options TEXT,
1734 additionalData MEDIUMTEXT,
31378fd1 1735 originIsSystem TINYINT(1) NOT NULL DEFAULT 0,
1e895431 1736 UNIQUE KEY optionName (optionName, packageID),
158bd3ca
TD
1737 KEY categoryName (categoryName)
1738);
1739
1740DROP TABLE IF EXISTS wcf1_user_option_category;
1741CREATE TABLE wcf1_user_option_category (
1742 categoryID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1743 packageID INT(10) NOT NULL,
a2bdc5f8
AE
1744 categoryName VARCHAR(191) NOT NULL DEFAULT '',
1745 parentCategoryName VARCHAR(191) NOT NULL DEFAULT '',
158bd3ca
TD
1746 showOrder INT(10) NOT NULL DEFAULT 0,
1747 permissions TEXT,
1e895431
AE
1748 options TEXT,
1749 UNIQUE KEY categoryName (categoryName)
158bd3ca
TD
1750);
1751
1752DROP TABLE IF EXISTS wcf1_user_option_value;
1753CREATE TABLE wcf1_user_option_value (
1754 userID INT(10) NOT NULL PRIMARY KEY
1755);
1756
320f4a6d
MW
1757DROP TABLE IF EXISTS wcf1_user_profile_menu_item;
1758CREATE TABLE wcf1_user_profile_menu_item (
1759 menuItemID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
1760 packageID INT(10) NOT NULL,
a2bdc5f8 1761 menuItem VARCHAR(191) NOT NULL,
320f4a6d
MW
1762 showOrder INT(10) NOT NULL DEFAULT 0,
1763 permissions TEXT NULL,
1764 options TEXT NULL,
1e895431
AE
1765 className VARCHAR(255) NOT NULL,
1766 UNIQUE KEY (packageID, menuItem)
320f4a6d
MW
1767);
1768
1769DROP TABLE IF EXISTS wcf1_user_profile_visitor;
1770CREATE TABLE wcf1_user_profile_visitor (
1771 visitorID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
85a3822b
MS
1772 ownerID INT(10) NOT NULL,
1773 userID INT(10) NOT NULL,
320f4a6d
MW
1774 time INT(10) NOT NULL DEFAULT 0,
1775 UNIQUE KEY (ownerID, userID),
1776 KEY (time)
1777);
1778
1779DROP TABLE IF EXISTS wcf1_user_rank;
1780CREATE TABLE wcf1_user_rank (
1781 rankID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
d2fbb3b5 1782 groupID INT(10) NOT NULL,
320f4a6d
MW
1783 requiredPoints INT(10) NOT NULL DEFAULT 0,
1784 rankTitle VARCHAR(255) NOT NULL DEFAULT '',
1785 cssClassName VARCHAR(255) NOT NULL DEFAULT '',
1786 rankImage VARCHAR(255) NOT NULL DEFAULT '',
1787 repeatImage TINYINT(3) NOT NULL DEFAULT 1,
2a379b2d
AE
1788 requiredGender TINYINT(1) NOT NULL DEFAULT 0,
1789 hideTitle TINYINT(1) NOT NULL DEFAULT 0
320f4a6d
MW
1790);
1791
0a67f96c
MS
1792DROP TABLE IF EXISTS wcf1_user_storage;
1793CREATE TABLE wcf1_user_storage (
1794 userID INT(10) NOT NULL,
1795 field VARCHAR(80) NOT NULL DEFAULT '',
1e895431 1796 fieldValue MEDIUMTEXT,
16de8cc5
TD
1797 UNIQUE KEY (userID, field),
1798 KEY (field)
0a67f96c
MS
1799);
1800
158bd3ca
TD
1801DROP TABLE IF EXISTS wcf1_user_to_group;
1802CREATE TABLE wcf1_user_to_group (
1803 userID INT(10) NOT NULL,
1804 groupID INT(10) NOT NULL,
1805 UNIQUE KEY userID (userID, groupID)
1806);
1807
1808DROP TABLE IF EXISTS wcf1_user_to_language;
1809CREATE TABLE wcf1_user_to_language (
1810 userID INT(10) NOT NULL,
1811 languageID INT(10) NOT NULL,
1812 UNIQUE KEY userID (userID, languageID)
1813);
1814
2fbf5046
AE
1815/* SQL_PARSER_OFFSET */
1816
9f959ced 1817/* foreign keys */
092bdf82
AE
1818ALTER TABLE wcf1_acl_option ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1819ALTER TABLE wcf1_acl_option ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
1820
1821ALTER TABLE wcf1_acl_option_category ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1822ALTER TABLE wcf1_acl_option_category ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
1823
1824ALTER TABLE wcf1_acl_option_to_user ADD FOREIGN KEY (optionID) REFERENCES wcf1_acl_option (optionID) ON DELETE CASCADE;
1825ALTER TABLE wcf1_acl_option_to_user ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
1826
1827ALTER TABLE wcf1_acl_option_to_group ADD FOREIGN KEY (optionID) REFERENCES wcf1_acl_option (optionID) ON DELETE CASCADE;
1828ALTER TABLE wcf1_acl_option_to_group ADD FOREIGN KEY (groupID) REFERENCES wcf1_user_group (groupID) ON DELETE CASCADE;
1829
2441de47
AE
1830ALTER TABLE wcf1_acl_simple_to_user ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
1831ALTER TABLE wcf1_acl_simple_to_user ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
1832
1833ALTER TABLE wcf1_acl_simple_to_group ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
1834ALTER TABLE wcf1_acl_simple_to_group ADD FOREIGN KEY (groupID) REFERENCES wcf1_user_group (groupID) ON DELETE CASCADE;
1835
158bd3ca
TD
1836ALTER TABLE wcf1_acp_menu_item ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1837
e9311b98
AE
1838ALTER TABLE wcf1_acp_search_provider ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1839
158bd3ca 1840ALTER TABLE wcf1_acp_session ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
158bd3ca
TD
1841
1842ALTER TABLE wcf1_acp_session_access_log ADD FOREIGN KEY (sessionLogID) REFERENCES wcf1_acp_session_log (sessionLogID) ON DELETE CASCADE;
158bd3ca 1843
158bd3ca
TD
1844ALTER TABLE wcf1_acp_session_log ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
1845
e1622bfa
TD
1846ALTER TABLE wcf1_acp_session_virtual ADD FOREIGN KEY (sessionID) REFERENCES wcf1_acp_session (sessionID) ON DELETE CASCADE ON UPDATE CASCADE;
1847
158bd3ca
TD
1848ALTER TABLE wcf1_acp_template ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1849
e866b80e
MS
1850ALTER TABLE wcf1_ad ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
1851
158bd3ca 1852ALTER TABLE wcf1_application ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
124dcf73 1853ALTER TABLE wcf1_application ADD FOREIGN KEY (landingPageID) REFERENCES wcf1_page (pageID) ON DELETE SET NULL;
158bd3ca 1854
a5a4f02d
MW
1855ALTER TABLE wcf1_article ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
1856ALTER TABLE wcf1_article ADD FOREIGN KEY (categoryID) REFERENCES wcf1_category (categoryID) ON DELETE SET NULL;
1857
1858ALTER TABLE wcf1_article_content ADD FOREIGN KEY (articleID) REFERENCES wcf1_article (articleID) ON DELETE CASCADE;
1859ALTER TABLE wcf1_article_content ADD FOREIGN KEY (languageID) REFERENCES wcf1_language (languageID) ON DELETE SET NULL;
1860ALTER TABLE wcf1_article_content ADD FOREIGN KEY (imageID) REFERENCES wcf1_media (mediaID) ON DELETE SET NULL;
79305986 1861ALTER TABLE wcf1_article_content ADD FOREIGN KEY (teaserImageID) REFERENCES wcf1_media (mediaID) ON DELETE SET NULL;
a5a4f02d 1862
f0bc263f
MW
1863ALTER TABLE wcf1_attachment ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
1864ALTER TABLE wcf1_attachment ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
1865
dcc2332d
MW
1866ALTER TABLE wcf1_bbcode ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1867
1868ALTER TABLE wcf1_bbcode_attribute ADD FOREIGN KEY (bbcodeID) REFERENCES wcf1_bbcode (bbcodeID) ON DELETE CASCADE;
1869
7d346d2a
MW
1870ALTER TABLE wcf1_bbcode_media_provider ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1871
91317611 1872ALTER TABLE wcf1_box ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
11fd4618 1873ALTER TABLE wcf1_box ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
39abe192 1874ALTER TABLE wcf1_box ADD FOREIGN KEY (menuID) REFERENCES wcf1_menu (menuID) ON DELETE CASCADE;
5636588a 1875ALTER TABLE wcf1_box ADD FOREIGN KEY (linkPageID) REFERENCES wcf1_page (pageID) ON DELETE SET NULL;
11fd4618 1876
059bcdba
AE
1877/* SQL_PARSER_OFFSET */
1878
11fd4618 1879ALTER TABLE wcf1_box_content ADD FOREIGN KEY (boxID) REFERENCES wcf1_box (boxID) ON DELETE CASCADE;
56eb7314
MS
1880ALTER TABLE wcf1_box_content ADD FOREIGN KEY (languageID) REFERENCES wcf1_language (languageID) ON DELETE CASCADE;
1881ALTER TABLE wcf1_box_content ADD FOREIGN KEY (imageID) REFERENCES wcf1_media (mediaID) ON DELETE SET NULL;
11fd4618 1882
53cf1c00
MW
1883ALTER TABLE wcf1_box_to_page ADD FOREIGN KEY (boxID) REFERENCES wcf1_box (boxID) ON DELETE CASCADE;
1884ALTER TABLE wcf1_box_to_page ADD FOREIGN KEY (pageID) REFERENCES wcf1_page (pageID) ON DELETE CASCADE;
1885
13d8b49b
MS
1886ALTER TABLE wcf1_category ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
1887
054db725
TD
1888ALTER TABLE wcf1_cli_history ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
1889
0e6741f8
AE
1890ALTER TABLE wcf1_clipboard_action ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1891
25cf4d11 1892ALTER TABLE wcf1_clipboard_item ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
0e6741f8
AE
1893
1894ALTER TABLE wcf1_clipboard_page ADD FOREIGN KEY (actionID) REFERENCES wcf1_clipboard_action (actionID) ON DELETE CASCADE;
1895ALTER TABLE wcf1_clipboard_page ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1896
87d3a054
MS
1897ALTER TABLE wcf1_condition ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
1898
158bd3ca
TD
1899ALTER TABLE wcf1_core_object ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1900
1901ALTER TABLE wcf1_cronjob ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1902
1903ALTER TABLE wcf1_cronjob_log ADD FOREIGN KEY (cronjobID) REFERENCES wcf1_cronjob (cronjobID) ON DELETE CASCADE;
1904
81aa6374
TD
1905ALTER TABLE wcf1_edit_history_entry ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
1906ALTER TABLE wcf1_edit_history_entry ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
f86d7ff7 1907ALTER TABLE wcf1_edit_history_entry ADD FOREIGN KEY (obsoletedByUserID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
81aa6374 1908
158bd3ca
TD
1909ALTER TABLE wcf1_event_listener ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1910
1911ALTER TABLE wcf1_language_item ADD FOREIGN KEY (languageID) REFERENCES wcf1_language (languageID) ON DELETE CASCADE;
1912ALTER TABLE wcf1_language_item ADD FOREIGN KEY (languageCategoryID) REFERENCES wcf1_language_category (languageCategoryID) ON DELETE CASCADE;
1913ALTER TABLE wcf1_language_item ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1914
059bcdba
AE
1915/* SQL_PARSER_OFFSET */
1916
cf4e950c 1917ALTER TABLE wcf1_media ADD FOREIGN KEY (categoryID) REFERENCES wcf1_category (categoryID) ON DELETE SET NULL;
59ab4d0f
MS
1918ALTER TABLE wcf1_media ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
1919ALTER TABLE wcf1_media ADD FOREIGN KEY (languageID) REFERENCES wcf1_language (languageID) ON DELETE SET NULL;
1920
1921ALTER TABLE wcf1_media_content ADD FOREIGN KEY (mediaID) REFERENCES wcf1_media (mediaID) ON DELETE CASCADE;
1922ALTER TABLE wcf1_media_content ADD FOREIGN KEY (languageID) REFERENCES wcf1_language (languageID) ON DELETE CASCADE;
1923
c5dd767e 1924ALTER TABLE wcf1_menu ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
e7fb3339
MW
1925
1926ALTER TABLE wcf1_menu_item ADD FOREIGN KEY (menuID) REFERENCES wcf1_menu (menuID) ON DELETE CASCADE;
1927ALTER TABLE wcf1_menu_item ADD FOREIGN KEY (parentItemID) REFERENCES wcf1_menu_item (itemID) ON DELETE SET NULL;
effc9389
AE
1928ALTER TABLE wcf1_menu_item ADD FOREIGN KEY (pageID) REFERENCES wcf1_page (pageID) ON DELETE CASCADE;
1929ALTER TABLE wcf1_menu_item ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
e7fb3339 1930
3a2de7fd
AE
1931ALTER TABLE wcf1_modification_log ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
1932ALTER TABLE wcf1_modification_log ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
1933
7fcc7676
MW
1934ALTER TABLE wcf1_object_type ADD FOREIGN KEY (definitionID) REFERENCES wcf1_object_type_definition (definitionID) ON DELETE CASCADE;
1935ALTER TABLE wcf1_object_type ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1936
1937ALTER TABLE wcf1_object_type_definition ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1938
158bd3ca
TD
1939ALTER TABLE wcf1_option ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1940
1941ALTER TABLE wcf1_option_category ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1942
89484ba0
AE
1943ALTER TABLE wcf1_package_compatibility ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1944
158bd3ca
TD
1945ALTER TABLE wcf1_package_exclusion ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1946
1947ALTER TABLE wcf1_package_installation_file_log ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1948
1949ALTER TABLE wcf1_package_installation_form ADD FOREIGN KEY (queueID) REFERENCES wcf1_package_installation_queue (queueID) ON DELETE CASCADE;
1950
1951ALTER TABLE wcf1_package_installation_node ADD FOREIGN KEY (queueID) REFERENCES wcf1_package_installation_queue (queueID) ON DELETE CASCADE;
1952
1953ALTER TABLE wcf1_package_installation_plugin ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1954
1955ALTER TABLE wcf1_package_installation_queue ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
1956ALTER TABLE wcf1_package_installation_queue ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE SET NULL;
1957
1958ALTER TABLE wcf1_package_installation_sql_log ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1959
1b4f5112
AE
1960/* SQL_PARSER_OFFSET */
1961
158bd3ca
TD
1962ALTER TABLE wcf1_package_requirement ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1963ALTER TABLE wcf1_package_requirement ADD FOREIGN KEY (requirement) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1964
158bd3ca
TD
1965ALTER TABLE wcf1_package_update ADD FOREIGN KEY (packageUpdateServerID) REFERENCES wcf1_package_update_server (packageUpdateServerID) ON DELETE CASCADE;
1966
89484ba0
AE
1967ALTER TABLE wcf1_package_update_compatibility ADD FOREIGN KEY (packageUpdateVersionID) REFERENCES wcf1_package_update_version (packageUpdateVersionID) ON DELETE CASCADE;
1968
158bd3ca
TD
1969ALTER TABLE wcf1_package_update_exclusion ADD FOREIGN KEY (packageUpdateVersionID) REFERENCES wcf1_package_update_version (packageUpdateVersionID) ON DELETE CASCADE;
1970
1971ALTER TABLE wcf1_package_update_fromversion ADD FOREIGN KEY (packageUpdateVersionID) REFERENCES wcf1_package_update_version (packageUpdateVersionID) ON DELETE CASCADE;
1972
1973ALTER TABLE wcf1_package_update_requirement ADD FOREIGN KEY (packageUpdateVersionID) REFERENCES wcf1_package_update_version (packageUpdateVersionID) ON DELETE CASCADE;
1974
b4f1ea02 1975ALTER TABLE wcf1_package_update_optional ADD FOREIGN KEY (packageUpdateVersionID) REFERENCES wcf1_package_update_version (packageUpdateVersionID) ON DELETE CASCADE;
158bd3ca
TD
1976
1977ALTER TABLE wcf1_package_update_version ADD FOREIGN KEY (packageUpdateID) REFERENCES wcf1_package_update (packageUpdateID) ON DELETE CASCADE;
1978
4d8036f5
MW
1979ALTER TABLE wcf1_paid_subscription_user ADD FOREIGN KEY (subscriptionID) REFERENCES wcf1_paid_subscription (subscriptionID) ON DELETE CASCADE;
1980ALTER TABLE wcf1_paid_subscription_user ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
1981
1982ALTER TABLE wcf1_paid_subscription_transaction_log ADD FOREIGN KEY (subscriptionUserID) REFERENCES wcf1_paid_subscription_user (subscriptionUserID) ON DELETE SET NULL;
1983ALTER TABLE wcf1_paid_subscription_transaction_log ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
1984ALTER TABLE wcf1_paid_subscription_transaction_log ADD FOREIGN KEY (subscriptionID) REFERENCES wcf1_paid_subscription (subscriptionID) ON DELETE SET NULL;
1985ALTER TABLE wcf1_paid_subscription_transaction_log ADD FOREIGN KEY (paymentMethodObjectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
1986
0bdb3cdf
MW
1987ALTER TABLE wcf1_page ADD FOREIGN KEY (parentPageID) REFERENCES wcf1_page (pageID) ON DELETE SET NULL;
1988ALTER TABLE wcf1_page ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
19dadfda 1989ALTER TABLE wcf1_page ADD FOREIGN KEY (applicationPackageID) REFERENCES wcf1_package (packageID) ON DELETE SET NULL;
0bdb3cdf 1990
5b85fc64
AE
1991ALTER TABLE wcf1_page_box_order ADD FOREIGN KEY (pageID) REFERENCES wcf1_page (pageID) ON DELETE CASCADE;
1992ALTER TABLE wcf1_page_box_order ADD FOREIGN KEY (boxID) REFERENCES wcf1_box (boxID) ON DELETE CASCADE;
1993
0bdb3cdf
MW
1994ALTER TABLE wcf1_page_content ADD FOREIGN KEY (pageID) REFERENCES wcf1_page (pageID) ON DELETE CASCADE;
1995ALTER TABLE wcf1_page_content ADD FOREIGN KEY (languageID) REFERENCES wcf1_language (languageID) ON DELETE CASCADE;
1996
11117cd5
AE
1997ALTER TABLE wcf1_registry ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
1998
158bd3ca
TD
1999ALTER TABLE wcf1_search ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2000
059bcdba
AE
2001/* SQL_PARSER_OFFSET */
2002
158bd3ca 2003ALTER TABLE wcf1_session ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
e8d26212 2004ALTER TABLE wcf1_session ADD FOREIGN KEY (spiderID) REFERENCES wcf1_spider (spiderID) ON DELETE CASCADE;
da5a61fb
MW
2005ALTER TABLE wcf1_session ADD FOREIGN KEY (pageID) REFERENCES wcf1_page (pageID) ON DELETE SET NULL;
2006ALTER TABLE wcf1_session ADD FOREIGN KEY (parentPageID) REFERENCES wcf1_page (pageID) ON DELETE SET NULL;
158bd3ca 2007
281ac362 2008ALTER TABLE wcf1_session_virtual ADD FOREIGN KEY (sessionID) REFERENCES wcf1_session (sessionID) ON DELETE CASCADE ON UPDATE CASCADE;
5a05fde9 2009
dcc2332d
MW
2010ALTER TABLE wcf1_smiley ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
2011ALTER TABLE wcf1_smiley ADD FOREIGN KEY (categoryID) REFERENCES wcf1_category (categoryID) ON DELETE SET NULL;
2012
461a69ea 2013ALTER TABLE wcf1_user_storage ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
158bd3ca
TD
2014
2015ALTER TABLE wcf1_style ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
2016
4d9f6058
AE
2017ALTER TABLE wcf1_style_variable_value ADD FOREIGN KEY (styleID) REFERENCES wcf1_style (styleID) ON DELETE CASCADE;
2018ALTER TABLE wcf1_style_variable_value ADD FOREIGN KEY (variableID) REFERENCES wcf1_style_variable (variableID) ON DELETE CASCADE;
158bd3ca
TD
2019
2020ALTER TABLE wcf1_template ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
2021ALTER TABLE wcf1_template ADD FOREIGN KEY (templateGroupID) REFERENCES wcf1_template_group (templateGroupID) ON DELETE CASCADE;
2022
6570e38e
MW
2023ALTER TABLE wcf1_template_group ADD FOREIGN KEY (parentTemplateGroupID) REFERENCES wcf1_template_group (templateGroupID) ON DELETE SET NULL;
2024
158bd3ca
TD
2025ALTER TABLE wcf1_template_listener ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
2026
704e0423
JR
2027ALTER TABLE wcf1_trophy ADD FOREIGN KEY (categoryID) REFERENCES wcf1_category (categoryID) ON DELETE CASCADE;
2028
a8e8aa21
AE
2029ALTER TABLE wcf1_user_collapsible_content ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2030ALTER TABLE wcf1_user_collapsible_content ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2031
87d3a054
MS
2032ALTER TABLE wcf1_user_group_assignment ADD FOREIGN KEY (groupID) REFERENCES wcf1_user_group (groupID) ON DELETE CASCADE;
2033
158bd3ca
TD
2034ALTER TABLE wcf1_user_group_option ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
2035
2036ALTER TABLE wcf1_user_group_option_category ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
2037
2038ALTER TABLE wcf1_user_group_option_value ADD FOREIGN KEY (groupID) REFERENCES wcf1_user_group (groupID) ON DELETE CASCADE;
2039ALTER TABLE wcf1_user_group_option_value ADD FOREIGN KEY (optionID) REFERENCES wcf1_user_group_option (optionID) ON DELETE CASCADE;
2040
2fbf5046
AE
2041/* SQL_PARSER_OFFSET */
2042
158bd3ca
TD
2043ALTER TABLE wcf1_user_option ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
2044
2045ALTER TABLE wcf1_user_option_category ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
2046
2047ALTER TABLE wcf1_user_option_value ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2048
2049ALTER TABLE wcf1_user_to_group ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2050ALTER TABLE wcf1_user_to_group ADD FOREIGN KEY (groupID) REFERENCES wcf1_user_group (groupID) ON DELETE CASCADE;
2051
2052ALTER TABLE wcf1_user_to_language ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2053ALTER TABLE wcf1_user_to_language ADD FOREIGN KEY (languageID) REFERENCES wcf1_language (languageID) ON DELETE CASCADE;
2054
16977ca6
JR
2055ALTER TABLE wcf1_user_trophy ADD FOREIGN KEY (trophyID) REFERENCES wcf1_trophy (trophyID) ON DELETE CASCADE;
2056ALTER TABLE wcf1_user_trophy ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2057
78db8ddf
MW
2058ALTER TABLE wcf1_import_mapping ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2059
320f4a6d
MW
2060ALTER TABLE wcf1_tracked_visit ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2061ALTER TABLE wcf1_tracked_visit ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2062
2063ALTER TABLE wcf1_tracked_visit_type ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2064ALTER TABLE wcf1_tracked_visit_type ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2065
2066ALTER TABLE wcf1_user ADD FOREIGN KEY (avatarID) REFERENCES wcf1_user_avatar (avatarID) ON DELETE SET NULL;
2067ALTER TABLE wcf1_user ADD FOREIGN KEY (rankID) REFERENCES wcf1_user_rank (rankID) ON DELETE SET NULL;
2068ALTER TABLE wcf1_user ADD FOREIGN KEY (userOnlineGroupID) REFERENCES wcf1_user_group (groupID) ON DELETE SET NULL;
2069
059bcdba
AE
2070/* SQL_PARSER_OFFSET */
2071
320f4a6d
MW
2072ALTER TABLE wcf1_user_avatar ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2073
2074ALTER TABLE wcf1_user_follow ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2075ALTER TABLE wcf1_user_follow ADD FOREIGN KEY (followUserID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2076
2077ALTER TABLE wcf1_user_ignore ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2078ALTER TABLE wcf1_user_ignore ADD FOREIGN KEY (ignoreUserID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2079
2080ALTER TABLE wcf1_user_menu_item ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
2081
320f4a6d
MW
2082ALTER TABLE wcf1_user_notification ADD FOREIGN KEY (eventID) REFERENCES wcf1_user_notification_event (eventID) ON DELETE CASCADE;
2083ALTER TABLE wcf1_user_notification ADD FOREIGN KEY (authorID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
4341fcab
AE
2084ALTER TABLE wcf1_user_notification ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2085
2086ALTER TABLE wcf1_user_notification_author ADD FOREIGN KEY (notificationID) REFERENCES wcf1_user_notification (notificationID) ON DELETE CASCADE;
2087ALTER TABLE wcf1_user_notification_author ADD FOREIGN KEY (authorID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
320f4a6d
MW
2088
2089ALTER TABLE wcf1_user_notification_to_user ADD FOREIGN KEY (notificationID) REFERENCES wcf1_user_notification (notificationID) ON DELETE CASCADE;
2090ALTER TABLE wcf1_user_notification_to_user ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2091
2092ALTER TABLE wcf1_user_notification_event ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
2093ALTER TABLE wcf1_user_notification_event ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2094
2095ALTER TABLE wcf1_user_notification_event_to_user ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2096ALTER TABLE wcf1_user_notification_event_to_user ADD FOREIGN KEY (eventID) REFERENCES wcf1_user_notification_event (eventID) ON DELETE CASCADE;
2097
2098ALTER TABLE wcf1_user_profile_menu_item ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
2099
1b4f5112
AE
2100/* SQL_PARSER_OFFSET */
2101
d2fbb3b5 2102ALTER TABLE wcf1_user_rank ADD FOREIGN KEY (groupID) REFERENCES wcf1_user_group (groupID) ON DELETE CASCADE;
320f4a6d
MW
2103
2104ALTER TABLE wcf1_user_activity_event ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2105ALTER TABLE wcf1_user_activity_event ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2106ALTER TABLE wcf1_user_activity_event ADD FOREIGN KEY (languageID) REFERENCES wcf1_language (languageID) ON DELETE SET NULL;
2107
2108ALTER TABLE wcf1_user_activity_point ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2109ALTER TABLE wcf1_user_activity_point ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2110
359f3c53
MW
2111ALTER TABLE wcf1_user_authentication_failure ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
2112
320f4a6d
MW
2113ALTER TABLE wcf1_user_profile_visitor ADD FOREIGN KEY (ownerID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2114ALTER TABLE wcf1_user_profile_visitor ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2115
2116ALTER TABLE wcf1_user_object_watch ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2117ALTER TABLE wcf1_user_object_watch ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2118
a83d788a
JR
2119ALTER TABLE wcf1_user_special_trophy ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2120ALTER TABLE wcf1_user_special_trophy ADD FOREIGN KEY (trophyID) REFERENCES wcf1_trophy (trophyID) ON DELETE CASCADE;
2121
0a2b09a2
MW
2122ALTER TABLE wcf1_message_embedded_object ADD FOREIGN KEY (messageObjectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2123ALTER TABLE wcf1_message_embedded_object ADD FOREIGN KEY (embeddedObjectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2124
fc69b61d
MW
2125ALTER TABLE wcf1_moderation_queue ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2126ALTER TABLE wcf1_moderation_queue ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
2127ALTER TABLE wcf1_moderation_queue ADD FOREIGN KEY (assignedUserID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
2128
2129ALTER TABLE wcf1_moderation_queue_to_user ADD FOREIGN KEY (queueID) REFERENCES wcf1_moderation_queue (queueID) ON DELETE CASCADE;
2130ALTER TABLE wcf1_moderation_queue_to_user ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2131
00b6f956
MW
2132ALTER TABLE wcf1_like ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2133ALTER TABLE wcf1_like ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2134ALTER TABLE wcf1_like ADD FOREIGN KEY (objectUserID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
2558960e 2135ALTER TABLE wcf1_like ADD FOREIGN KEY (reactionTypeID) REFERENCES wcf1_reaction_type (reactionTypeID) ON DELETE CASCADE;
00b6f956
MW
2136
2137ALTER TABLE wcf1_like_object ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2138ALTER TABLE wcf1_like_object ADD FOREIGN KEY (objectUserID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
2139
059bcdba
AE
2140/* SQL_PARSER_OFFSET */
2141
285b1d92
MW
2142ALTER TABLE wcf1_comment ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2143ALTER TABLE wcf1_comment ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
2144
2145ALTER TABLE wcf1_comment_response ADD FOREIGN KEY (commentID) REFERENCES wcf1_comment (commentID) ON DELETE CASCADE;
2146ALTER TABLE wcf1_comment_response ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
2147
3b75466f
MW
2148ALTER TABLE wcf1_label ADD FOREIGN KEY (groupID) REFERENCES wcf1_label_group (groupID) ON DELETE CASCADE;
2149
2150ALTER TABLE wcf1_label_group_to_object ADD FOREIGN KEY (groupID) REFERENCES wcf1_label_group (groupID) ON DELETE CASCADE;
2151ALTER TABLE wcf1_label_group_to_object ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2152
2153ALTER TABLE wcf1_label_object ADD FOREIGN KEY (labelID) REFERENCES wcf1_label (labelID) ON DELETE CASCADE;
2154ALTER TABLE wcf1_label_object ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2155
04c06e85
MW
2156ALTER TABLE wcf1_tag ADD FOREIGN KEY (synonymFor) REFERENCES wcf1_tag (tagID) ON DELETE CASCADE;
2157
2158ALTER TABLE wcf1_tag_to_object ADD FOREIGN KEY (tagID) REFERENCES wcf1_tag (tagID) ON DELETE CASCADE;
2159ALTER TABLE wcf1_tag_to_object ADD FOREIGN KEY (languageID) REFERENCES wcf1_language (languageID) ON DELETE CASCADE;
2160ALTER TABLE wcf1_tag_to_object ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2161
891de7a0
MW
2162ALTER TABLE wcf1_stat_daily ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2163
e25b7b61
MW
2164ALTER TABLE wcf1_poll ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
2165
2166ALTER TABLE wcf1_poll_option ADD FOREIGN KEY (pollID) REFERENCES wcf1_poll (pollID) ON DELETE CASCADE;
2167
2168ALTER TABLE wcf1_poll_option_vote ADD FOREIGN KEY (pollID) REFERENCES wcf1_poll (pollID) ON DELETE CASCADE;
2169ALTER TABLE wcf1_poll_option_vote ADD FOREIGN KEY (optionID) REFERENCES wcf1_poll_option (optionID) ON DELETE CASCADE;
2170ALTER TABLE wcf1_poll_option_vote ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2171
20933e61
MS
2172ALTER TABLE wcf1_notice_dismissed ADD FOREIGN KEY (noticeID) REFERENCES wcf1_notice (noticeID) ON DELETE CASCADE;
2173ALTER TABLE wcf1_notice_dismissed ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
2174
2fbf5046
AE
2175/* SQL_PARSER_OFFSET */
2176
9f959ced 2177/* default inserts */
158bd3ca 2178-- default user groups
3f69fee7
AE
2179INSERT INTO wcf1_user_group (groupID, groupName, groupType) VALUES (1, 'wcf.acp.group.group1', 1); -- Everyone
2180INSERT INTO wcf1_user_group (groupID, groupName, groupType) VALUES (2, 'wcf.acp.group.group2', 2); -- Guests
2181INSERT INTO wcf1_user_group (groupID, groupName, groupType) VALUES (3, 'wcf.acp.group.group3', 3); -- Registered Users
2182INSERT INTO wcf1_user_group (groupID, groupName, groupType) VALUES (4, 'wcf.acp.group.group4', 4); -- Administrators
2183INSERT INTO wcf1_user_group (groupID, groupName, groupType) VALUES (5, 'wcf.acp.group.group5', 4); -- Moderators
47459aed 2184
158bd3ca 2185-- default user group options
ae6b590f 2186INSERT INTO wcf1_user_group_option (optionID, optionName, categoryName, optionType, defaultValue, showOrder, usersOnly) VALUES (1, 'admin.general.canUseAcp', 'admin.general', 'boolean', '0', 1, 1);
6476e7a1 2187INSERT INTO wcf1_user_group_option (optionID, optionName, categoryName, optionType, defaultValue, showOrder, usersOnly) VALUES (2, 'admin.configuration.package.canInstallPackage', 'admin.configuration.package', 'boolean', '0', 1, 1);
ae6b590f 2188INSERT INTO wcf1_user_group_option (optionID, optionName, categoryName, optionType, defaultValue, showOrder, usersOnly) VALUES (3, 'admin.user.canEditGroup', 'admin.user.group', 'boolean', '0', 1, 1);
158bd3ca
TD
2189
2190-- default user group option values
2191INSERT INTO wcf1_user_group_option_value (groupID, optionID, optionValue) VALUES (1, 1, '0'); -- Everyone
2192INSERT INTO wcf1_user_group_option_value (groupID, optionID, optionValue) VALUES (1, 2, '0'); -- Everyone
2193INSERT INTO wcf1_user_group_option_value (groupID, optionID, optionValue) VALUES (1, 3, '0'); -- Everyone
2194INSERT INTO wcf1_user_group_option_value (groupID, optionID, optionValue) VALUES (4, 1, '1'); -- Administrators
2195INSERT INTO wcf1_user_group_option_value (groupID, optionID, optionValue) VALUES (4, 2, '1'); -- Administrators
2196INSERT INTO wcf1_user_group_option_value (groupID, optionID, optionValue) VALUES (4, 3, '1'); -- Administrators
47459aed 2197
158bd3ca 2198-- default update servers
ba9a2bda 2199INSERT INTO wcf1_package_update_server (serverURL, status, isDisabled, errorMessage, lastUpdateTime, loginUsername, loginPassword) VALUES ('http://update.woltlab.com/vortex/', 'online', 0, NULL, 0, '', '');
89484ba0 2200INSERT INTO wcf1_package_update_server (serverURL, status, isDisabled, errorMessage, lastUpdateTime, loginUsername, loginPassword) VALUES ('http://update.woltlab.com/tornado/', 'online', 0, NULL, 0, '', '');
ba9a2bda 2201INSERT INTO wcf1_package_update_server (serverURL, status, isDisabled, errorMessage, lastUpdateTime, loginUsername, loginPassword) VALUES ('http://store.woltlab.com/vortex/', 'online', 0, NULL, 0, '', '');
89484ba0 2202INSERT INTO wcf1_package_update_server (serverURL, status, isDisabled, errorMessage, lastUpdateTime, loginUsername, loginPassword) VALUES ('http://store.woltlab.com/tornado/', 'online', 0, NULL, 0, '', '');
4d9f6058
AE
2203
2204-- style default values
97ec0367 2205INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('individualScss', '');
3321b9c6 2206INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('messageSidebarOrientation', 'left');
97ec0367 2207INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('overrideScss', '');
ed8c9052 2208INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('pageLogo', '');
07937b16 2209INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('pageLogoWidth', '281');
4a292263
MW
2210INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('pageLogoHeight', '40');
2211INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('pageLogoMobile', '');
ed8c9052
AE
2212INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('useFluidLayout', '1');
2213INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('useGoogleFont', '1');
5d1c2d79
AE
2214INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonBackground', 'rgba(207, 216, 220, 1)');
2215INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonBackgroundActive', 'rgba(120, 144, 156, 1)');
95cc4d01 2216INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonDisabledBackground', 'rgba(223, 223, 223, 1)');
95cc4d01
AE
2217INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonDisabledText', 'rgba(165, 165, 165, 1)');
2218INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonPrimaryBackground', 'rgba(33, 150, 243, 1)');
2219INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonPrimaryBackgroundActive', 'rgba(26, 119, 201, 1)');
95cc4d01 2220INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonPrimaryText', 'rgba(255, 255, 255, 1)');
ed8c9052 2221INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonPrimaryTextActive', 'rgba(255, 255, 255, 1)');
95cc4d01 2222INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonText', 'rgba(33, 33, 33, 1)');
5d1c2d79 2223INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfButtonTextActive', 'rgba(255, 255, 255, 1)');
002297c1 2224INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentBackground', 'rgba(250, 250, 250, 1)');
4e359429 2225INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentBorder', 'rgba(65, 121, 173, 1)');
002297c1 2226INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentBorderInner', 'rgba(224, 224, 224, 1)');
811f5a93
AE
2227INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentContainerBackground', 'rgba(255, 255, 255, 1)');
2228INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentContainerBorder', 'rgba(236, 241, 247, 1)');
962f1164
AE
2229INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentDimmedLink', 'rgba(52, 73, 94, 1)');
2230INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentDimmedLinkActive', 'rgba(52, 73, 94, 1)');
487db634 2231INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentDimmedText', 'rgba(125, 130, 135, 1)');
962f1164
AE
2232INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentHeadlineBorder', 'rgba(238, 238, 238, 1)');
2233INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentHeadlineLink', 'rgba(44, 62, 80, 1)');
2234INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentHeadlineLinkActive', 'rgba(44, 62, 80, 1)');
2235INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentHeadlineText', 'rgba(44, 62, 80, 1)');
002297c1
AE
2236INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentLink', 'rgba(230, 81, 0, 1)');
2237INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentLinkActive', 'rgba(191, 54, 12, 1)');
ed8c9052
AE
2238INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfContentText', 'rgba(44, 62, 80, 1)');
2239INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfDropdownBackground', 'rgba(255, 255, 255, 1)');
c1956b1c 2240INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfDropdownBackgroundActive', 'rgba(238, 238, 238, 1)');
962f1164 2241INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfDropdownBorderInner', 'rgba(238, 238, 238, 1)');
c1956b1c
AE
2242INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfDropdownLink', 'rgba(33, 33, 33, 1)');
2243INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfDropdownLinkActive', 'rgba(33, 33, 33, 1)');
2244INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfDropdownText', 'rgba(33, 33, 33, 1)');
aa893dd8
AE
2245INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfEditorButtonBackground', 'rgba(58, 109, 156, 1)');
2246INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfEditorButtonBackgroundActive', 'rgba(36, 66, 95, 1)');
2247INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfEditorButtonText', 'rgba(255, 255, 255, 1)');
2248INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfEditorButtonTextActive', 'rgba(255, 255, 255, 1)');
2249INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfEditorButtonTextDisabled', 'rgba(165, 165, 165, 1)');
219eb1ae 2250INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFontFamilyFallback', '"Segoe UI", "DejaVu Sans", "Lucida Grande", "Helvetica", sans-serif');
ed8c9052 2251INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFontFamilyGoogle', 'Open Sans');
852e099f 2252INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFontLineHeight', '1.48');
962f1164 2253INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFontSizeDefault', '14px');
ed8c9052 2254INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFontSizeHeadline', '18px');
f6fc939a 2255INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFontSizeSection', '23px');
ed8c9052 2256INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFontSizeSmall', '12px');
487db634 2257INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFontSizeTitle', '28px');
4e359429 2258INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterBackground', 'rgba(58, 109, 156, 1)');
5d1c2d79 2259INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterBoxBackground', 'rgba(236, 239, 241, 1)');
6063a7ec
AE
2260INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterBoxHeadlineLink', 'rgba(44, 62, 80, 1)');
2261INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterBoxHeadlineLinkActive', 'rgba(44, 62, 80, 1)');
2262INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterBoxHeadlineText', 'rgba(44, 62, 80, 1)');
002297c1
AE
2263INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterBoxLink', 'rgba(230, 81, 0, 1)');
2264INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterBoxLinkActive', 'rgba(191, 54, 12, 1)');
6063a7ec 2265INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterBoxText', 'rgba(44, 62, 80, 1)');
4e359429 2266INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterCopyrightBackground', 'rgba(50, 92, 132, 1)');
d3925b67 2267INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterCopyrightLink', 'rgba(217, 220, 222, 1)');
6063a7ec 2268INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterCopyrightLinkActive', 'rgba(255, 255, 255, 1)');
4e359429 2269INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterCopyrightText', 'rgba(217, 220, 222, 1)');
f6fc939a
AE
2270INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterHeadlineLink', 'rgba(255, 255, 255, 1)');
2271INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterHeadlineLinkActive', 'rgba(255, 255, 255, 1)');
2272INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterHeadlineText', 'rgba(189, 195, 199, 1)');
ed8c9052
AE
2273INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterLink', 'rgba(255, 255, 255, 1)');
2274INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterLinkActive', 'rgba(255, 255, 255, 1)');
4e359429
AE
2275INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfFooterText', 'rgba(217, 220, 222, 1)');
2276INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderBackground', 'rgba(58, 109, 156, 1)');
55b402a0 2277INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderText', 'rgba(255, 255, 255, 1)');
453b84d5 2278INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderLink', 'rgba(255, 255, 255, 1)');
ed8c9052 2279INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderLinkActive', 'rgba(255, 255, 255, 1)');
4e359429
AE
2280INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderMenuBackground', 'rgba(50, 92, 132, 1)');
2281INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderMenuLinkBackground', 'rgba(43, 79, 113, 1)');
2282INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderMenuLinkBackgroundActive', 'rgba(36, 66, 95, 1)');
f6fc939a 2283INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderMenuLink', 'rgba(255, 255, 255, 1)');
ed8c9052 2284INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderMenuLinkActive', 'rgba(255, 255, 255, 1)');
4df658a4
AE
2285INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderMenuDropdownBackground', 'rgba(36, 66, 95, 1)');
2286INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderMenuDropdownBackgroundActive', 'rgba(65, 121, 173, 1)');
a9e43634 2287INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderMenuDropdownLink', 'rgba(255, 255, 255, 1)');
f6fc939a 2288INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderMenuDropdownLinkActive', 'rgba(255, 255, 255, 1)');
4e359429
AE
2289INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderSearchBoxBackground', 'rgba(50, 92, 132, 1)');
2290INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderSearchBoxBackgroundActive', 'rgba(50, 92, 132, 1)');
70318665
AE
2291INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderSearchBoxText', 'rgba(255, 255, 255, 1)');
2292INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderSearchBoxTextActive', 'rgba(255, 255, 255, 1)');
6388408b
AE
2293INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderSearchBoxPlaceholder', 'rgba(207, 207, 207, 1)');
2294INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfHeaderSearchBoxPlaceholderActive', 'rgba(207, 207, 207, 1)');
487db634
MW
2295INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfInputBackground', 'rgba(241, 246, 251, 1)');
2296INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfInputBackgroundActive', 'rgba(241, 246, 251, 1)');
2297INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfInputBorder', 'rgba(176, 200, 224, 1)');
962f1164 2298INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfInputBorderActive', 'rgba(41, 128, 185, 1)');
487db634
MW
2299INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfInputDisabledBackground', 'rgba(245, 245, 245, 1)');
2300INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfInputDisabledBorder', 'rgba(174, 176, 179, 1)');
2301INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfInputDisabledText', 'rgba(125, 130, 100, 1)');
b4f2a6be 2302INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfInputLabel', 'rgba(59, 109, 169, 1)');
487db634
MW
2303INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfInputText', 'rgba(44, 62, 80, 1)');
2304INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfInputTextActive', 'rgba(44, 62, 80, 1)');
6e6b849f 2305INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfInputPlaceholder', 'rgba(169, 169, 169, 1)');
5d0e8b3f 2306INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfInputPlaceholderActive', 'rgba(204, 204, 204, 1)');
ed8c9052 2307INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfLayoutFixedWidth', '1200px');
962f1164 2308INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfLayoutMaxWidth', '1400px');
df400238 2309INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfLayoutMinWidth', '1000px');
5d1c2d79 2310INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfNavigationBackground', 'rgba(236, 239, 241, 1)');
80786168
AE
2311INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfNavigationLink', 'rgba(44, 62, 80, 1)');
2312INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfNavigationLinkActive', 'rgba(44, 62, 80, 1)');
962f1164 2313INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfNavigationText', 'rgba(170, 170, 170, 1)');
efb111c4 2314INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfSidebarBackground', 'rgba(236, 241, 247, 1)');
962f1164
AE
2315INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfSidebarDimmedLink', 'rgba(44, 62, 80, 1)');
2316INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfSidebarDimmedLinkActive', 'rgba(44, 62, 80, 1)');
2317INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfSidebarDimmedText', 'rgba(127, 140, 141, 1)');
487db634
MW
2318INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfSidebarHeadlineLink', 'rgba(44, 62, 80, 1)');
2319INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfSidebarHeadlineLinkActive', 'rgba(44, 62, 80, 1)');
2320INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfSidebarHeadlineText', 'rgba(44, 62, 80, 1)');
002297c1
AE
2321INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfSidebarLink', 'rgba(230, 81, 0, 1)');
2322INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfSidebarLinkActive', 'rgba(191, 54, 12, 1)');
487db634 2323INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfSidebarText', 'rgba(44, 62, 80, 1)');
962f1164
AE
2324INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusErrorBackground', 'rgba(242, 222, 222, 1)');
2325INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusErrorBorder', 'rgba(235, 204, 204, 1)');
0c163e25
MW
2326INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusErrorLink', 'rgba(132, 53, 52, 1)');
2327INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusErrorLinkActive', 'rgba(132, 53, 52, 1)');
962f1164
AE
2328INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusErrorText', 'rgba(169, 68, 66, 1)');
2329INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusInfoBackground', 'rgba(217, 237, 247, 1)');
2330INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusInfoBorder', 'rgba(188, 223, 241, 1)');
0c163e25
MW
2331INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusInfoLink', 'rgba(36, 82, 105, 1)');
2332INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusInfoLinkActive', 'rgba(36, 82, 105, 1)');
962f1164
AE
2333INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusInfoText', 'rgba(49, 112, 143, 1)');
2334INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusSuccessBackground', 'rgba(223, 240, 216, 1)');
2335INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusSuccessBorder', 'rgba(208, 233, 198, 1)');
0c163e25
MW
2336INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusSuccessLink', 'rgba(43, 84, 44, 1)');
2337INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusSuccessLinkActive', 'rgba(43, 84, 44, 1)');
962f1164
AE
2338INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusSuccessText', 'rgba(60, 118, 61, 1)');
2339INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusWarningBackground', 'rgba(252, 248, 227, 1)');
2340INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusWarningBorder', 'rgba(250, 242, 204, 1)');
0c163e25
MW
2341INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusWarningLink', 'rgba(102, 81, 44, 1)');
2342INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusWarningLinkActive', 'rgba(102, 81, 44, 1)');
962f1164
AE
2343INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfStatusWarningText', 'rgba(138, 109, 59, 1)');
2344INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfTabularBoxBackgroundActive', 'rgba(242, 242, 242, 1)');
2345INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfTabularBoxBorderInner', 'rgba(238, 238, 238, 1)');
4e359429 2346INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfTabularBoxHeadline', 'rgba(65, 121, 173, 1)');
002297c1 2347INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfTabularBoxHeadlineActive', 'rgba(230, 81, 0, 1)');
ed8c9052
AE
2348INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfTextShadowDark', 'rgba(0, 0, 0, .8)');
2349INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfTextShadowLight', 'rgba(255, 255, 255, .8)');
2350INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfTooltipBackground', 'rgba(0, 0, 0, .8)');
2351INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfTooltipText', 'rgba(255, 255, 255, 1)');
dcc2332d 2352
76eee28f
TD
2353-- Email template group
2354INSERT INTO wcf1_template_group (parentTemplateGroupID, templateGroupName, templateGroupFolderName) VALUES (NULL, 'wcf.acp.template.group.email', '_wcf_email/');
c0587328 2355
320f4a6d
MW
2356-- default priorities
2357UPDATE wcf1_user_group SET priority = 10 WHERE groupID = 3;
2358UPDATE wcf1_user_group SET priority = 1000 WHERE groupID = 4;
c3ab3fe0 2359UPDATE wcf1_user_group SET priority = 100 WHERE groupID = 5;
320f4a6d
MW
2360
2361-- default 'showOnTeamPage' setting
c3ab3fe0 2362UPDATE wcf1_user_group SET showOnTeamPage = 1 WHERE groupID IN (4, 5);
320f4a6d
MW
2363
2364-- default ranks
2365INSERT INTO wcf1_user_rank (groupID, requiredPoints, rankTitle, cssClassName) VALUES
2366 (4, 0, 'wcf.user.rank.administrator', 'blue'),
2367 (5, 0, 'wcf.user.rank.moderator', 'blue'),
320f4a6d
MW
2368 (3, 0, 'wcf.user.rank.user0', ''),
2369 (3, 300, 'wcf.user.rank.user1', ''),
2370 (3, 900, 'wcf.user.rank.user2', ''),
2371 (3, 3000, 'wcf.user.rank.user3', ''),
2372 (3, 9000, 'wcf.user.rank.user4', ''),
861451f4 2373 (3, 15000, 'wcf.user.rank.user5', '');
d486ae88 2374
c308c947
AE
2375-- default options: subject and message
2376INSERT INTO wcf1_contact_option (optionID, optionTitle, optionDescription, optionType, required, showOrder, originIsSystem) VALUES (1, 'wcf.contact.option1', 'wcf.contact.optionDescription1', 'text', 1, 1, 1);
2377INSERT INTO wcf1_contact_option (optionID, optionTitle, optionDescription, optionType, required, showOrder, originIsSystem) VALUES (2, 'wcf.contact.option2', '', 'textarea', 1, 1, 1);
2378
d486ae88
AE
2379-- default recipient: site administrator
2380INSERT INTO wcf1_contact_recipient (recipientID, name, email, isAdministrator, originIsSystem) VALUES (1, 'wcf.contact.recipient.name1', '', 1, 1);
736ac5c2
JR
2381
2382-- default reaction type
2383INSERT INTO wcf1_reaction_type (title, type, showOrder, iconFile) VALUES ('wcf.reactionType.title1', 1, 1, 'like.svg');
2384INSERT INTO wcf1_reaction_type (title, type, showOrder, iconFile) VALUES ('wcf.reactionType.title2', 1, 2, 'haha.svg');
2385INSERT INTO wcf1_reaction_type (title, type, showOrder, iconFile) VALUES ('wcf.reactionType.title3', -1, 3, 'sad.svg');
2386INSERT INTO wcf1_reaction_type (title, type, showOrder, iconFile) VALUES ('wcf.reactionType.title4', 0, 4, 'confused.svg');
2387INSERT INTO wcf1_reaction_type (title, type, showOrder, iconFile) VALUES ('wcf.reactionType.title5', 1, 5, 'thanks.svg');