From 9a90e38902c585b3df67bfe32d9eeb8d5b1f4ec8 Mon Sep 17 00:00:00 2001 From: InfiniteStash <117855276+InfiniteStash@users.noreply.github.com> Date: Sun, 29 Dec 2024 23:39:57 +0100 Subject: [PATCH] Fix edit update migration to set revision of old edits (#877) --- pkg/database/migrations/postgres/39_edits_updates.up.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/database/migrations/postgres/39_edits_updates.up.sql b/pkg/database/migrations/postgres/39_edits_updates.up.sql index 69545d8c3..357faa410 100644 --- a/pkg/database/migrations/postgres/39_edits_updates.up.sql +++ b/pkg/database/migrations/postgres/39_edits_updates.up.sql @@ -1,3 +1,6 @@ ALTER TABLE "edits" ADD COLUMN "update_count" integer NOT NULL DEFAULT 0; +UPDATE "edits" +SET "update_count" = 1 +WHERE "updated_at" IS NOT NULL;