mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
9abd44671d
commit
51407d4a29
4 changed files with 36 additions and 22 deletions
|
@ -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 '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue