From: Tim Düsterhus Date: Mon, 23 Jun 2014 15:14:38 +0000 (+0200) Subject: Add database table and objectTypeDefinition of Edit History X-Git-Tag: 2.1.0_Alpha_1~590^2~18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=81aa6374a87ddc22d982883d78753d6c44766080;p=GitHub%2FWoltLab%2FWCF.git Add database table and objectTypeDefinition of Edit History --- diff --git a/com.woltlab.wcf/objectTypeDefinition.xml b/com.woltlab.wcf/objectTypeDefinition.xml index f1614aa7b3..256f3c9856 100644 --- a/com.woltlab.wcf/objectTypeDefinition.xml +++ b/com.woltlab.wcf/objectTypeDefinition.xml @@ -94,6 +94,11 @@ + + com.woltlab.wcf.edit.historySavingObject + + + com.woltlab.wcf.comment.commentableContent diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index ab2eea92d5..59b4f6d5d6 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -350,6 +350,20 @@ CREATE TABLE wcf1_dashboard_option ( UNIQUE KEY dashboardOption (objectTypeID, boxID) ); +DROP TABLE IF EXISTS wcf1_edit_history_entry; +CREATE TABLE wcf1_edit_history_entry ( + entryID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, + objectTypeID INT(10) NOT NULL, + objectID INT(10) NOT NULL, + userID INT(10), + username VARCHAR(255) NOT NULL DEFAULT '', + time INT(10) NOT NULL DEFAULT 0, + message MEDIUMTEXT, + editReason TEXT, + + KEY (objectTypeID, objectID) +); + DROP TABLE IF EXISTS wcf1_event_listener; CREATE TABLE wcf1_event_listener ( listenerID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -1462,6 +1476,9 @@ ALTER TABLE wcf1_cronjob ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (pa ALTER TABLE wcf1_cronjob_log ADD FOREIGN KEY (cronjobID) REFERENCES wcf1_cronjob (cronjobID) ON DELETE CASCADE; +ALTER TABLE wcf1_edit_history_entry ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE; +ALTER TABLE wcf1_edit_history_entry ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL; + ALTER TABLE wcf1_event_listener ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE; ALTER TABLE wcf1_language_item ADD FOREIGN KEY (languageID) REFERENCES wcf1_language (languageID) ON DELETE CASCADE;