From: Matthias Schmidt Date: Thu, 8 Sep 2011 20:23:53 +0000 (+0200) Subject: Sorts the database tables in install.sql X-Git-Tag: 2.0.0_Beta_1~1765^2~36^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0a67f96cd01886c95c1542556cc935f65958f724;p=GitHub%2FWoltLab%2FWCF.git Sorts the database tables in install.sql --- diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index b4e83a8555..368053ce57 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -26,12 +26,6 @@ CREATE TABLE wcf1_acp_session ( 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, @@ -45,6 +39,12 @@ CREATE TABLE wcf1_acp_session_access_log ( 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, @@ -96,6 +96,15 @@ CREATE TABLE wcf1_cleanup_listener ( 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, @@ -129,15 +138,6 @@ CREATE TABLE wcf1_clipboard_page ( 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, @@ -568,6 +568,18 @@ CREATE TABLE wcf1_template_group ( 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, @@ -674,6 +686,15 @@ CREATE TABLE wcf1_user_option_value ( 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, @@ -688,27 +709,6 @@ CREATE TABLE wcf1_user_to_language ( 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;