summaryrefslogtreecommitdiffstats
path: root/upgrading
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-12-13 20:57:06 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2015-12-13 21:19:31 +0100
commit51407d4a296563ccb3f488589a531babba7a8c22 (patch)
tree792a8a062c7b9668f3f8637fbbe9c1be6a7a1ef5 /upgrading
parent9abd44671d690f91440c22e2069060500811cd21 (diff)
downloadaurweb-51407d4a296563ccb3f488589a531babba7a8c22.tar.xz
Store current date and time when deleting comments
Instead of modifying EditedTS when a comment is deleted, use a separate field DelTS. Use this field to determine whether a comment has been deleted, instead of checking DelUsersID which might be unset when the corresponding user is deleted. Fixes FS#47362. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'upgrading')
-rw-r--r--upgrading/4.2.0.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/upgrading/4.2.0.txt b/upgrading/4.2.0.txt
index 7482204..851d384 100644
--- a/upgrading/4.2.0.txt
+++ b/upgrading/4.2.0.txt
@@ -16,14 +16,21 @@ CREATE UNIQUE INDEX ProviderNameProvides ON OfficialProviders (Name, Provides);
ALTER TABLE Users MODIFY Email VARCHAR(254) NOT NULL;
----
-3. Add new column in PackageComments for pinning system.
+3. Add new columns to the PackageComments table:
----
-ALTER TABLE PackageComments ADD COLUMN PinnedTS BIGINT UNSIGNED NOT NULL DEFAULT 0;
+ALTER TABLE PackageComments
+ ADD COLUMN DelTS BIGINT UNSIGNED NULL DEFAULT NULL,
+ ADD COLUMN PinnedTS BIGINT UNSIGNED NOT NULL DEFAULT 0;
----
+4. Update the deletion time stamp of all deleted comments:
-3. Add new column to store the closure comment of package requests:
+----
+UPDATE PackageComments SET DelTS = EditedTS WHERE DelUsersID IS NOT NULL;
+----
+
+5. Add new column to store the closure comment of package requests:
----
ALTER TABLE PackageRequests ADD COLUMN ClosureComment TEXT NOT NULL DEFAULT '';