Advertisement
Justman10000

WoltLab - install.sql

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