/*
This table was moved up here, because it must be created during the first iteration
-
+
DO *NOT* MOVE IT BACK!
*/
DROP TABLE IF EXISTS wcf1_package_installation_sql_log;
-CREATE TABLE wcf1_package_installation_sql_log (
- packageID INT(10),
- sqlTable VARCHAR(100) NOT NULL DEFAULT '',
- sqlColumn VARCHAR(100) NOT NULL DEFAULT '',
+CREATE TABLE wcf1_package_installation_sql_log (
+ packageID INT(10),
+ sqlTable VARCHAR(100) NOT NULL DEFAULT '',
+ sqlColumn VARCHAR(100) NOT NULL DEFAULT '',
sqlIndex VARCHAR(100) NOT NULL DEFAULT '',
isDone TINYINT(1) NOT NULL DEFAULT 1,
- UNIQUE KEY packageID (packageID, sqlTable, sqlColumn, sqlIndex)
+ UNIQUE KEY packageID (packageID, sqlTable, sqlColumn, sqlIndex)
);
/* tables */
cumulativeLikes MEDIUMINT(7) NOT NULL DEFAULT 0,
isDeleted TINYINT(1) NOT NULL DEFAULT 0,
hasLabels TINYINT(1) NOT NULL DEFAULT 0,
-
+
KEY (time)
);
hasEmbeddedObjects TINYINT(1) NOT NULL DEFAULT 0,
metaTitle VARCHAR(255) NOT NULL DEFAULT '',
metaDescription VARCHAR(255) NOT NULL DEFAULT '',
-
+
UNIQUE KEY (articleID, languageID)
);
filesize INT(10) NOT NULL DEFAULT 0,
fileType VARCHAR(255) NOT NULL DEFAULT '',
fileHash VARCHAR(40) NOT NULL DEFAULT '',
-
+
isImage TINYINT(1) NOT NULL DEFAULT 0,
width SMALLINT(5) NOT NULL DEFAULT 0,
height SMALLINT(5) NOT NULL DEFAULT 0,
-
+
tinyThumbnailType VARCHAR(255) NOT NULL DEFAULT '',
tinyThumbnailSize INT(10) NOT NULL DEFAULT 0,
tinyThumbnailWidth SMALLINT(5) NOT NULL DEFAULT 0,
tinyThumbnailHeight SMALLINT(5) NOT NULL DEFAULT 0,
-
+
thumbnailType VARCHAR(255) NOT NULL DEFAULT '',
thumbnailSize INT(10) NOT NULL DEFAULT 0,
thumbnailWidth SMALLINT(5) NOT NULL DEFAULT 0,
thumbnailHeight SMALLINT(5) NOT NULL DEFAULT 0,
-
+
downloads INT(10) NOT NULL DEFAULT 0,
lastDownloadTime INT(10) NOT NULL DEFAULT 0,
uploadTime INT(10) NOT NULL DEFAULT 0,
delta2 TINYINT(1) NOT NULL DEFAULT 0,
delta3 TINYINT(1) NOT NULL DEFAULT 0,
delta4 TINYINT(1) NOT NULL DEFAULT 0,
-
+
UNIQUE KEY day (date)
);
hash BINARY(32),
lastSeen DATETIME NOT NULL,
occurrences SMALLINT(5) NOT NULL,
-
+
UNIQUE KEY entry (type, hash),
KEY numberOfReports (type, occurrences)
);
content MEDIUMTEXT,
imageID INT(10),
hasEmbeddedObjects TINYINT(1) NOT NULL DEFAULT 0,
-
+
UNIQUE KEY (boxID, languageID)
);
boxID INT(10) NOT NULL,
pageID INT(10) NOT NULL,
visible TINYINT(1) NOT NULL DEFAULT 1,
-
+
UNIQUE KEY (pageID, boxID),
KEY (pageID, visible)
);
unfilteredResponseIDs VARCHAR(255) NOT NULL DEFAULT '',
enableHtml TINYINT(1) NOT NULL DEFAULT 0,
isDisabled TINYINT(1) NOT NULL DEFAULT 0,
-
+
KEY (objectTypeID, objectID, isDisabled, time),
KEY lastCommentTime (userID, time)
);
message MEDIUMTEXT NOT NULL,
enableHtml TINYINT(1) NOT NULL DEFAULT 0,
isDisabled TINYINT(1) NOT NULL DEFAULT 0,
-
+
KEY (commentID, isDisabled, time),
KEY lastResponseTime (userID, time)
);
state TINYINT(1) NOT NULL DEFAULT 0,
failCount TINYINT(1) NOT NULL DEFAULT 0,
options TEXT,
-
+
UNIQUE KEY cronjobName (cronjobName, packageID)
);
projectID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(191) NOT NULL,
path TEXT,
-
+
UNIQUE KEY name (name)
);
languageItem VARCHAR(191) NOT NULL,
lastTime INT(10) NOT NULL,
stackTrace MEDIUMTEXT NOT NULL,
-
+
UNIQUE KEY (languageID, languageItem)
);
obsoletedByUserID INT(10),
message MEDIUMTEXT,
editReason TEXT,
-
+
KEY (objectTypeID, objectID),
KEY (obsoletedAt, obsoletedByUserID)
);
recipientID INT(10) DEFAULT NULL,
status VARCHAR(255) NOT NULL,
message TEXT,
-
+
KEY time (time)
);
niceValue TINYINT(3) NOT NULL DEFAULT 0,
permissions TEXT,
options TEXT,
-
+
UNIQUE KEY listenerName (listenerName, packageID)
);
labelID INT(10) NOT NULL,
objectTypeID INT(10) NOT NULL,
objectID INT(10) NOT NULL,
-
+
KEY (objectTypeID, labelID),
KEY (objectTypeID, objectID)
);
languageItemOldValue MEDIUMTEXT,
languageCustomItemDisableTime INT(10),
isCustomLanguageItem TINYINT(1) NOT NULL DEFAULT 0,
-
+
UNIQUE KEY languageItem (languageItem, languageID),
KEY languageItemOriginIsSystem (languageItemOriginIsSystem)
);
DROP TABLE IF EXISTS wcf1_like;
CREATE TABLE wcf1_like (
- likeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ likeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
objectID INT(10) NOT NULL DEFAULT 0,
objectTypeID INT(10) NOT NULL,
objectUserID INT(10),
CREATE TABLE wcf1_like_object (
likeObjectID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
objectTypeID INT(10) NOT NULL,
- objectID INT(10) NOT NULL DEFAULT 0,
+ objectID INT(10) NOT NULL DEFAULT 0,
objectUserID INT(10),
likes MEDIUMINT(7) NOT NULL DEFAULT 0,
dislikes MEDIUMINT(7) NOT NULL DEFAULT 0,
CREATE TABLE wcf1_media (
mediaID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
categoryID INT(10),
-
+
filename VARCHAR(255) NOT NULL DEFAULT '',
filesize INT(10) NOT NULL DEFAULT 0,
fileType VARCHAR(255) NOT NULL DEFAULT '',
languageID INT(10),
isMultilingual TINYINT(1) NOT NULL DEFAULT 0,
captionEnableHtml TINYINT(1) NOT NULL DEFAULT 0,
-
+
isImage TINYINT(1) NOT NULL DEFAULT 0,
width SMALLINT(5) NOT NULL DEFAULT 0,
height SMALLINT(5) NOT NULL DEFAULT 0,
-
+
tinyThumbnailType VARCHAR(255) NOT NULL DEFAULT '',
tinyThumbnailSize INT(10) NOT NULL DEFAULT 0,
tinyThumbnailWidth SMALLINT(5) NOT NULL DEFAULT 0,
tinyThumbnailHeight SMALLINT(5) NOT NULL DEFAULT 0,
-
+
smallThumbnailType VARCHAR(255) NOT NULL DEFAULT '',
smallThumbnailSize INT(10) NOT NULL DEFAULT 0,
smallThumbnailWidth SMALLINT(5) NOT NULL DEFAULT 0,
smallThumbnailHeight SMALLINT(5) NOT NULL DEFAULT 0,
-
+
mediumThumbnailType VARCHAR(255) NOT NULL DEFAULT '',
mediumThumbnailSize INT(10) NOT NULL DEFAULT 0,
mediumThumbnailWidth SMALLINT(5) NOT NULL DEFAULT 0,
mediumThumbnailHeight SMALLINT(5) NOT NULL DEFAULT 0,
-
+
largeThumbnailType VARCHAR(255) NOT NULL DEFAULT '',
largeThumbnailSize INT(10) NOT NULL DEFAULT 0,
largeThumbnailWidth SMALLINT(5) NOT NULL DEFAULT 0,
largeThumbnailHeight SMALLINT(5) NOT NULL DEFAULT 0,
-
+
downloads INT(10) NOT NULL DEFAULT 0,
lastDownloadTime INT(10) NOT NULL DEFAULT 0
);
messageID INT(10) NOT NULL,
embeddedObjectTypeID INT(10) NOT NULL,
embeddedObjectID INT(10) NOT NULL,
-
+
KEY (messageObjectTypeID, messageID)
);
containerID INT(10) NOT NULL DEFAULT 0,
userID INT(10) NULL,
time INT(10) NOT NULL DEFAULT 0,
-
+
-- internal
assignedUserID INT(10) NULL,
status TINYINT(1) NOT NULL DEFAULT 0,
comments SMALLINT(5) NOT NULL DEFAULT 0,
lastChangeTime INT(10) NOT NULL DEFAULT 0,
-
+
-- additional data, e.g. message if reporting content
additionalData TEXT,
-
+
KEY objectTypeAndID (objectTypeID, objectID)
);
queueID INT(10) NOT NULL,
userID INT(10) NOT NULL,
isAffected TINYINT(1) NOT NULL DEFAULT 0,
-
+
UNIQUE KEY queue (queueID, userID),
KEY affected (queueID, userID, isAffected)
);
action VARCHAR(80) NOT NULL,
hidden TINYINT(1) NOT NULL DEFAULT 1,
additionalData MEDIUMTEXT,
-
+
KEY objectTypeAndID (objectTypeID, objectID)
);
supportI18n TINYINT(1) NOT NULL DEFAULT 0,
requireI18n TINYINT(1) NOT NULL DEFAULT 0,
additionalData MEDIUMTEXT,
-
+
UNIQUE KEY optionName (optionName)
);
metaDescription TEXT,
customURL VARCHAR(255) NOT NULL,
hasEmbeddedObjects TINYINT(1) NOT NULL DEFAULT 0,
-
+
UNIQUE KEY (pageID, languageID)
);
endDate INT(10) NOT NULL DEFAULT 0,
isActive TINYINT(1) NOT NULL DEFAULT 1,
sentExpirationNotification TINYINT(1) NOT NULL DEFAULT 0,
-
+
UNIQUE KEY (subscriptionID, userID),
KEY (isActive)
);
pollID INT(10) NOT NULL,
optionID INT(10) NOT NULL,
userID INT(10) NOT NULL,
-
+
KEY (optionID, userID),
UNIQUE KEY vote (pollID, optionID, userID)
);
-DROP TABLE IF EXISTS wcf1_reaction_type;
+DROP TABLE IF EXISTS wcf1_reaction_type;
CREATE TABLE wcf1_reaction_type (
- reactionTypeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
- title VARCHAR(255) NOT NULL,
+ reactionTypeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ title VARCHAR(255) NOT NULL,
showOrder INT(10) NOT NULL DEFAULT 0,
- iconFile VARCHAR(255) NOT NULL DEFAULT '',
+ iconFile VARCHAR(255) NOT NULL DEFAULT '',
isAssignable TINYINT(1) NOT NULL DEFAULT 1
);
packageID INT(10) NOT NULL,
field VARCHAR(191) NOT NULL,
fieldValue MEDIUMTEXT,
-
+
UNIQUE KEY uniqueField (packageID, field)
);
date DATE NOT NULL,
counter INT(10) NOT NULL DEFAULT 0,
total INT(10) NOT NULL DEFAULT 0,
-
+
UNIQUE KEY (objectTypeID, date)
);
isTainted TINYINT(1) NOT NULL DEFAULT 0,
hasFavicon TINYINT(1) NOT NULL DEFAULT 0,
coverPhotoExtension VARCHAR(4) NOT NULL DEFAULT '',
- apiVersion ENUM('3.0', '3.1', '5.2') NOT NULL DEFAULT '3.0'
+ apiVersion ENUM('3.0', '3.1', '5.2') NOT NULL DEFAULT '3.0'
);
DROP TABLE IF EXISTS wcf1_style_variable;
niceValue TINYINT(3) NOT NULL DEFAULT 0,
permissions TEXT,
options TEXT,
-
+
KEY templateName (environment, templateName)
);
CREATE TABLE wcf1_trophy(
trophyID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255),
- description MEDIUMTEXT,
+ description MEDIUMTEXT,
categoryID INT(10) NOT NULL,
type SMALLINT(1) DEFAULT 1,
- iconFile MEDIUMTEXT,
+ iconFile MEDIUMTEXT,
iconName VARCHAR(255),
iconColor VARCHAR(255),
badgeColor VARCHAR(255),
disableCoverPhotoExpires INT(10) NOT NULL DEFAULT 0,
articles INT(10) NOT NULL DEFAULT 0,
blacklistMatches VARCHAR(255) NOT NULL DEFAULT '',
-
+
UNIQUE KEY username (username),
KEY email (email),
KEY registrationDate (registrationDate),
userID INT(10) NOT NULL,
time INT(10) NOT NULL,
additionalData TEXT,
-
+
KEY (time),
KEY (userID, time),
KEY (objectTypeID, objectID)
code VARCHAR(255) NOT NULL,
createTime INT(10) NOT NULL,
useTime INT(10) DEFAULT NULL,
-
+
UNIQUE KEY (setupID, identifier)
);
setupID INT(10) NOT NULL,
code VARCHAR(255) NOT NULL,
createTime INT(10) NOT NULL,
-
+
UNIQUE KEY (setupID, code)
);
minCounter INT(10) NOT NULL,
createTime INT(10) NOT NULL,
useTime INT(10) DEFAULT NULL,
-
+
UNIQUE KEY (setupID, deviceID)
);
objectID INT(10) NOT NULL,
userID INT(10) NOT NULL,
notification TINYINT(1) NOT NULL DEFAULT 0,
-
+
UNIQUE KEY (objectTypeID, userID, objectID),
KEY (objectTypeID, objectID)
);
labeledUrl MEDIUMTEXT,
required TINYINT(1) NOT NULL DEFAULT 0,
askDuringRegistration TINYINT(1) NOT NULL DEFAULT 0,
- editable TINYINT(1) NOT NULL DEFAULT 0,
- visible TINYINT(1) NOT NULL DEFAULT 0,
+ editable TINYINT(1) NOT NULL DEFAULT 0,
+ visible TINYINT(1) NOT NULL DEFAULT 0,
outputClass VARCHAR(255) NOT NULL DEFAULT '',
searchable TINYINT(1) NOT NULL DEFAULT 0,
showOrder INT(10) NOT NULL DEFAULT 0,
ALTER TABLE wcf1_like ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
ALTER TABLE wcf1_like ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
ALTER TABLE wcf1_like ADD FOREIGN KEY (objectUserID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
-ALTER TABLE wcf1_like ADD FOREIGN KEY (reactionTypeID) REFERENCES wcf1_reaction_type (reactionTypeID) ON DELETE CASCADE;
+ALTER TABLE wcf1_like ADD FOREIGN KEY (reactionTypeID) REFERENCES wcf1_reaction_type (reactionTypeID) ON DELETE CASCADE;
ALTER TABLE wcf1_like_object ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE;
ALTER TABLE wcf1_like_object ADD FOREIGN KEY (objectUserID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
-- Email template group
INSERT INTO wcf1_template_group (parentTemplateGroupID, templateGroupName, templateGroupFolderName) VALUES (NULL, 'wcf.acp.template.group.email', '_wcf_email/');
-
+
-- default priorities
UPDATE wcf1_user_group SET priority = 10 WHERE groupID = 3;
UPDATE wcf1_user_group SET priority = 1000 WHERE groupID = 4;