packageID INT(10) NOT NULL,
objectTypeID INT(10) NOT NULL,
optionName VARCHAR(255) NOT NULL,
- categoryName VARCHAR(255) NOT NULL
+ categoryName VARCHAR(255) NOT NULL,
+ UNIQUE KEY (packageID, objectTypeID, optionName)
);
DROP TABLE IF EXISTS wcf1_acl_option_category;
categoryID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
packageID INT(10) NOT NULL,
objectTypeID INT(10) NOT NULL,
- categoryName VARCHAR(255) NOT NULL
+ categoryName VARCHAR(255) NOT NULL,
+ UNIQUE KEY (packageID, objectTypeID, categoryName)
);
DROP TABLE IF EXISTS wcf1_acl_option_to_user;
showOrder INT(10) NOT NULL DEFAULT 0,
permissions TEXT,
options TEXT,
- icon VARCHAR(255) NOT NULL DEFAULT ''
+ icon VARCHAR(255) NOT NULL DEFAULT '',
+ UNIQUE KEY menuItem (menuItem, packageID)
);
DROP TABLE IF EXISTS wcf1_acp_search_provider;
packageID INT(10) NOT NULL,
providerName VARCHAR(255) NOT NULL DEFAULT '',
className VARCHAR(255) NOT NULL DEFAULT '',
- showOrder INT(10) NOT NULL DEFAULT 0
+ showOrder INT(10) NOT NULL DEFAULT 0,
+ UNIQUE KEY providerName (providerName, packageID)
);
DROP TABLE IF EXISTS wcf1_acp_session;
virtualSessionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
sessionID CHAR(40) NOT NULL,
ipAddress VARCHAR(39) NOT NULL DEFAULT '',
- userAgent VARCHAR(100) NOT NULL DEFAULT '',
+ userAgent VARCHAR(255) NOT NULL DEFAULT '',
lastActivityTime INT(10) NOT NULL DEFAULT 0,
sessionVariables MEDIUMTEXT,
UNIQUE KEY (sessionID, ipAddress, userAgent)
templateID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
packageID INT(10),
templateName VARCHAR(255) NOT NULL,
- application VARCHAR(20) NOT NULL
+ application VARCHAR(20) NOT NULL,
+ UNIQUE KEY applicationTemplate (application, templateName)
);
DROP TABLE IF EXISTS wcf1_ad;
isBlockElement TINYINT(1) NOT NULL DEFAULT 0,
isSourceCode TINYINT(1) NOT NULL DEFAULT 0,
showButton TINYINT(1) NOT NULL DEFAULT 0,
- originIsSystem TINYINT(1) NOT NULL DEFAULT 0
+ originIsSystem TINYINT(1) NOT NULL DEFAULT 0,
+ UNIQUE KEY bbcodeTag (bbcodeTag)
);
DROP TABLE IF EXISTS wcf1_bbcode_attribute;
packageID INT(10) NOT NULL DEFAULT 0,
actionName VARCHAR(50) NOT NULL DEFAULT '',
actionClassName VARCHAR(200) NOT NULL DEFAULT '',
- showOrder INT(10) NOT NULL DEFAULT 0
+ showOrder INT(10) NOT NULL DEFAULT 0,
+ UNIQUE KEY actionName (packageID, actionName, actionClassName)
);
DROP TABLE IF EXISTS wcf1_clipboard_item;
CREATE TABLE wcf1_core_object (
objectID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
packageID INT(10) NOT NULL,
- objectName VARCHAR(255) NOT NULL DEFAULT ''
+ objectName VARCHAR(255) NOT NULL DEFAULT '',
+ UNIQUE KEY object (packageID, objectName)
);
DROP TABLE IF EXISTS wcf1_cronjob;
canBeDisabled TINYINT(1) NOT NULL DEFAULT 1,
state TINYINT(1) NOT NULL DEFAULT 0,
failCount TINYINT(1) NOT NULL DEFAULT 0,
- options TEXT
+ options TEXT,
+
+ UNIQUE KEY cronjobName (cronjobName, packageID)
);
DROP TABLE IF EXISTS wcf1_cronjob_log;
inherit TINYINT(1) NOT NULL DEFAULT 0,
niceValue TINYINT(3) NOT NULL DEFAULT 0,
permissions TEXT,
- options TEXT
+ options TEXT,
+
+ UNIQUE KEY listenerName (listenerName, packageID)
);
DROP TABLE IF EXISTS wcf1_import_mapping;
DROP TABLE IF EXISTS wcf1_language_category;
CREATE TABLE wcf1_language_category (
languageCategoryID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
- languageCategory VARCHAR(255) NOT NULL DEFAULT ''
+ languageCategory VARCHAR(255) NOT NULL DEFAULT '',
+ UNIQUE KEY languageCategory (languageCategory)
);
DROP TABLE IF EXISTS wcf1_language_item;
CREATE TABLE wcf1_language_item (
languageItemID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
languageID INT(10) NOT NULL,
- languageItem VARCHAR(150) NOT NULL DEFAULT '',
+ languageItem VARCHAR(255) NOT NULL DEFAULT '',
languageItemValue MEDIUMTEXT NOT NULL,
languageCustomItemValue MEDIUMTEXT,
languageUseCustomValue TINYINT(1) NOT NULL DEFAULT 0,
objectTypeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
definitionID INT(10) NOT NULL,
packageID INT(10) NOT NULL,
- objectType VARCHAR(150) NOT NULL,
+ objectType VARCHAR(255) NOT NULL,
className VARCHAR(255) NOT NULL DEFAULT '',
additionalData MEDIUMTEXT,
UNIQUE KEY objectType (objectType, definitionID, packageID)
definitionName VARCHAR(255) NOT NULL,
packageID INT(10) NOT NULL,
interfaceName VARCHAR(255) NOT NULL DEFAULT '',
- categoryName VARCHAR(80) NOT NULL DEFAULT ''
+ categoryName VARCHAR(80) NOT NULL DEFAULT '',
+ UNIQUE KEY definitionName (definitionName)
);
DROP TABLE IF EXISTS wcf1_option;
options TEXT,
supportI18n TINYINT(1) NOT NULL DEFAULT 0,
requireI18n TINYINT(1) NOT NULL DEFAULT 0,
- additionalData MEDIUMTEXT
+ additionalData MEDIUMTEXT,
+
+ UNIQUE KEY optionName (optionName)
);
DROP TABLE IF EXISTS wcf1_option_category;
parentCategoryName VARCHAR(255) NOT NULL DEFAULT '',
showOrder INT(10) NOT NULL DEFAULT 0,
permissions TEXT,
- options TEXT
+ options TEXT,
+ UNIQUE KEY categoryName (categoryName)
);
DROP TABLE IF EXISTS wcf1_package;
CREATE TABLE wcf1_package_exclusion (
packageID INT(10) NOT NULL,
excludedPackage VARCHAR(255) NOT NULL DEFAULT '',
- excludedPackageVersion VARCHAR(255) NOT NULL DEFAULT ''
+ excludedPackageVersion VARCHAR(255) NOT NULL DEFAULT '',
+ UNIQUE KEY packageID (packageID, excludedPackage)
);
DROP TABLE IF EXISTS wcf1_package_installation_file_log;
CREATE TABLE wcf1_package_installation_file_log (
packageID INT(10),
filename VARCHAR(255) NOT NULL,
- application VARCHAR(20) NOT NULL
+ application VARCHAR(20) NOT NULL,
+ UNIQUE KEY applicationFile (application, filename)
);
DROP TABLE IF EXISTS wcf1_package_installation_form;
CREATE TABLE wcf1_package_installation_form (
queueID INT(10) NOT NULL,
formName VARCHAR(80) NOT NULL DEFAULT '',
- document TEXT NOT NULL
+ document TEXT NOT NULL,
+ UNIQUE KEY formDocument (queueID, formName)
);
DROP TABLE IF EXISTS wcf1_package_installation_node;
packageID INT(10),
sqlTable VARCHAR(100) NOT NULL DEFAULT '',
sqlColumn VARCHAR(100) NOT NULL DEFAULT '',
- sqlIndex VARCHAR(100) NOT NULL DEFAULT ''
+ sqlIndex VARCHAR(100) NOT NULL DEFAULT '',
+ UNIQUE KEY packageID (packageID, sqlTable, sqlColumn, sqlIndex)
);
/* SQL_PARSER_OFFSET */
DROP TABLE IF EXISTS wcf1_package_requirement;
CREATE TABLE wcf1_package_requirement (
packageID INT(10) NOT NULL,
- requirement INT(10) NOT NULL
+ requirement INT(10) NOT NULL,
+ UNIQUE KEY packageID (packageID, requirement)
);
DROP TABLE IF EXISTS wcf1_package_update;
packageDescription VARCHAR(255) NOT NULL DEFAULT '',
author VARCHAR(255) NOT NULL DEFAULT '',
authorURL VARCHAR(255) NOT NULL DEFAULT '',
- isApplication TINYINT(1) NOT NULL DEFAULT 0
+ isApplication TINYINT(1) NOT NULL DEFAULT 0,
+ UNIQUE KEY packageUpdateServerID (packageUpdateServerID, package)
);
DROP TABLE IF EXISTS wcf1_package_update_exclusion;
CREATE TABLE wcf1_package_update_exclusion (
packageUpdateVersionID INT(10) NOT NULL,
excludedPackage VARCHAR(255) NOT NULL DEFAULT '',
- excludedPackageVersion VARCHAR(255) NOT NULL DEFAULT ''
+ excludedPackageVersion VARCHAR(255) NOT NULL DEFAULT '',
+ UNIQUE KEY packageUpdateVersionID (packageUpdateVersionID, excludedPackage)
);
DROP TABLE IF EXISTS wcf1_package_update_fromversion;
CREATE TABLE wcf1_package_update_fromversion (
packageUpdateVersionID INT(10) NOT NULL DEFAULT 0,
- fromversion VARCHAR(50) NOT NULL DEFAULT ''
+ fromversion VARCHAR(50) NOT NULL DEFAULT '',
+ UNIQUE KEY packageUpdateVersionID (packageUpdateVersionID, fromversion)
);
DROP TABLE IF EXISTS wcf1_package_update_optional;
CREATE TABLE wcf1_package_update_requirement (
packageUpdateVersionID INT(10) NOT NULL,
package VARCHAR(255) NOT NULL DEFAULT '',
- minversion VARCHAR(50) NOT NULL DEFAULT ''
+ minversion VARCHAR(50) NOT NULL DEFAULT '',
+ UNIQUE KEY packageUpdateVersionID (packageUpdateVersionID, package)
);
DROP TABLE IF EXISTS wcf1_package_update_server;
license VARCHAR(255) NOT NULL DEFAULT '',
licenseURL VARCHAR(255) NOT NULL DEFAULT '',
isAccessible TINYINT(1) NOT NULL DEFAULT 1,
- isCritical TINYINT(1) NOT NULL DEFAULT 0
+ isCritical TINYINT(1) NOT NULL DEFAULT 0,
+ UNIQUE KEY packageUpdateID (packageUpdateID, packageVersion)
);
DROP TABLE IF EXISTS wcf1_page;
keyword VARCHAR(255) NOT NULL,
searches INT(10) NOT NULL DEFAULT 0,
lastSearchTime INT(10) NOT NULL DEFAULT 0,
+ UNIQUE KEY (keyword),
KEY (searches, lastSearchTime)
);
virtualSessionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
sessionID CHAR(40) NOT NULL,
ipAddress VARCHAR(39) NOT NULL DEFAULT '',
- userAgent VARCHAR(100) NOT NULL DEFAULT '',
+ userAgent VARCHAR(255) NOT NULL DEFAULT '',
lastActivityTime INT(10) NOT NULL DEFAULT 0,
sessionVariables MEDIUMTEXT,
UNIQUE KEY (sessionID, ipAddress, userAgent)
smileyTitle VARCHAR(255) NOT NULL DEFAULT '',
smileyCode VARCHAR(255) NOT NULL DEFAULT '',
aliases TEXT NOT NULL,
- showOrder INT(10) NOT NULL DEFAULT 0
+ showOrder INT(10) NOT NULL DEFAULT 0,
+ UNIQUE KEY smileyCode (smileyCode)
);
DROP TABLE IF EXISTS wcf1_spider;
CREATE TABLE wcf1_spider (
spiderID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
- spiderIdentifier VARCHAR(150) DEFAULT '',
+ spiderIdentifier VARCHAR(255) DEFAULT '',
spiderName VARCHAR(255) DEFAULT '',
spiderURL VARCHAR(255) DEFAULT '',
UNIQUE KEY spiderIdentifier (spiderIdentifier)
CREATE TABLE wcf1_style_variable (
variableID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
variableName VARCHAR(50) NOT NULL,
- defaultValue MEDIUMTEXT
+ defaultValue MEDIUMTEXT,
+ UNIQUE KEY variableName (variableName)
);
DROP TABLE IF EXISTS wcf1_style_variable_value;
tagID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
languageID INT(10) NOT NULL DEFAULT 0,
name VARCHAR(255) NOT NULL,
- synonymFor INT(10)
+ synonymFor INT(10),
+ UNIQUE KEY (languageID, name)
);
DROP TABLE IF EXISTS wcf1_tag_to_object;
application VARCHAR(20) NOT NULL,
templateGroupID INT(10),
lastModificationTime INT(10) NOT NULL DEFAULT 0,
+ UNIQUE KEY applicationTemplate (application, templateGroupID, templateName),
KEY templateGroupID (packageID, templateGroupID, templateName)
);
permissions TEXT,
options TEXT,
usersOnly TINYINT(1) NOT NULL DEFAULT 0,
- additionalData MEDIUMTEXT
+ additionalData MEDIUMTEXT,
+ UNIQUE KEY optionName (optionName, packageID)
);
DROP TABLE IF EXISTS wcf1_user_group_option_category;
parentCategoryName VARCHAR(255) NOT NULL DEFAULT '',
showOrder INT(10) NOT NULL DEFAULT 0,
permissions TEXT,
- options TEXT
+ options TEXT,
+ UNIQUE KEY categoryName (categoryName)
);
DROP TABLE IF EXISTS wcf1_user_group_option_value;
permissions TEXT,
options TEXT,
className VARCHAR(255) NOT NULL DEFAULT '',
- iconClassName VARCHAR(255) NOT NULL DEFAULT ''
+ iconClassName VARCHAR(255) NOT NULL DEFAULT '',
+ UNIQUE KEY menuItem (menuItem, packageID)
);
-- notifications
permissions TEXT,
options TEXT,
preset TINYINT(1) NOT NULL DEFAULT 0,
- presetMailNotificationType ENUM('none', 'instant', 'daily') NOT NULL DEFAULT 'none'
+ presetMailNotificationType ENUM('none', 'instant', 'daily') NOT NULL DEFAULT 'none',
+ UNIQUE KEY eventName (eventName, objectTypeID)
);
-- user configuration for events
options TEXT,
additionalData MEDIUMTEXT,
originIsSystem TINYINT(1) NOT NULL DEFAULT 0,
+ UNIQUE KEY optionName (optionName, packageID),
KEY categoryName (categoryName)
);
parentCategoryName VARCHAR(255) NOT NULL DEFAULT '',
showOrder INT(10) NOT NULL DEFAULT 0,
permissions TEXT,
- options TEXT
+ options TEXT,
+ UNIQUE KEY categoryName (categoryName)
);
DROP TABLE IF EXISTS wcf1_user_option_value;
showOrder INT(10) NOT NULL DEFAULT 0,
permissions TEXT NULL,
options TEXT NULL,
- className VARCHAR(255) NOT NULL
+ className VARCHAR(255) NOT NULL,
+ UNIQUE KEY (packageID, menuItem)
);
DROP TABLE IF EXISTS wcf1_user_profile_visitor;
CREATE TABLE wcf1_user_storage (
userID INT(10) NOT NULL,
field VARCHAR(80) NOT NULL DEFAULT '',
- fieldValue MEDIUMTEXT
+ fieldValue MEDIUMTEXT,
+ UNIQUE KEY userStorageData (userID, field)
);
DROP TABLE IF EXISTS wcf1_user_to_group;