KEY sessionID (sessionID, packageID)
);
-DROP TABLE IF EXISTS wcf1_acp_session_data;
-CREATE TABLE wcf1_acp_session_data (
- sessionID CHAR(40) NOT NULL PRIMARY KEY,
- sessionVariables MEDIUMTEXT
-);
-
DROP TABLE IF EXISTS wcf1_acp_session_access_log;
CREATE TABLE wcf1_acp_session_access_log (
sessionAccessLogID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
KEY sessionLogID (sessionLogID)
);
+DROP TABLE IF EXISTS wcf1_acp_session_data;
+CREATE TABLE wcf1_acp_session_data (
+ sessionID CHAR(40) NOT NULL PRIMARY KEY,
+ sessionVariables MEDIUMTEXT
+);
+
DROP TABLE IF EXISTS wcf1_acp_session_log;
CREATE TABLE wcf1_acp_session_log (
sessionLogID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
UNIQUE KEY (className, packageID)
);
+DROP TABLE IF EXISTS wcf1_cleanup_log;
+CREATE TABLE wcf1_cleanup_log (
+ packageID INT(10) NOT NULL DEFAULT 0,
+ objectType VARCHAR(255) NOT NULL DEFAULT '',
+ objectID INT(10) NOT NULL DEFAULT 0,
+ deleteTime INT(10) NOT NULL DEFAULT 0,
+ KEY objectType (objectType)
+);
+
DROP TABLE IF EXISTS wcf1_clipboard_action;
CREATE TABLE wcf1_clipboard_action (
actionID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
actionID INT(10) NOT NULL DEFAULT 0
);
-DROP TABLE IF EXISTS wcf1_cleanup_log;
-CREATE TABLE wcf1_cleanup_log (
- packageID INT(10) NOT NULL DEFAULT 0,
- objectType VARCHAR(255) NOT NULL DEFAULT '',
- objectID INT(10) NOT NULL DEFAULT 0,
- deleteTime INT(10) NOT NULL DEFAULT 0,
- KEY objectType (objectType)
-);
-
DROP TABLE IF EXISTS wcf1_core_object;
CREATE TABLE wcf1_core_object (
objectID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
templateGroupFolderName VARCHAR(255) NOT NULL DEFAULT ''
);
+DROP TABLE IF EXISTS wcf1_template_listener;
+CREATE TABLE wcf1_template_listener (
+ listenerID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ packageID INT(10) NOT NULL,
+ name VARCHAR(80) NOT NULL DEFAULT '',
+ environment ENUM('user','admin') NOT NULL DEFAULT 'user',
+ templateName VARCHAR(80) NOT NULL DEFAULT '',
+ eventName VARCHAR(50) NOT NULL DEFAULT '',
+ templateCode TEXT NOT NULL,
+ KEY templateName (environment, templateName)
+);
+
DROP TABLE IF EXISTS wcf1_user;
CREATE TABLE wcf1_user (
userID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
userID INT(10) NOT NULL PRIMARY KEY
);
+DROP TABLE IF EXISTS wcf1_user_storage;
+CREATE TABLE wcf1_user_storage (
+ userID INT(10) NOT NULL,
+ field VARCHAR(80) NOT NULL DEFAULT '',
+ fieldValue TEXT,
+ packageID INT(10),
+ UNIQUE KEY userStorageData (userID, field, packageID)
+);
+
DROP TABLE IF EXISTS wcf1_user_to_group;
CREATE TABLE wcf1_user_to_group (
userID INT(10) NOT NULL,
UNIQUE KEY userID (userID, languageID)
);
-DROP TABLE IF EXISTS wcf1_template_listener;
-CREATE TABLE wcf1_template_listener (
- listenerID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
- packageID INT(10) NOT NULL,
- name VARCHAR(80) NOT NULL DEFAULT '',
- environment ENUM('user','admin') NOT NULL DEFAULT 'user',
- templateName VARCHAR(80) NOT NULL DEFAULT '',
- eventName VARCHAR(50) NOT NULL DEFAULT '',
- templateCode TEXT NOT NULL,
- KEY templateName (environment, templateName)
-);
-
-DROP TABLE IF EXISTS wcf1_user_storage;
-CREATE TABLE wcf1_user_storage (
- userID INT(10) NOT NULL,
- field VARCHAR(80) NOT NULL DEFAULT '',
- fieldValue TEXT,
- packageID INT(10),
- UNIQUE KEY userStorageData (userID, field, packageID)
-);
-
/**** foreign keys ****/
ALTER TABLE wcf1_acp_menu_item ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;