From c6c376b59cfa9047565e3502294967379abb91b3 Mon Sep 17 00:00:00 2001 From: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> Date: Wed, 13 Mar 2024 17:18:19 +0100 Subject: [PATCH] chore: content_script_version_2: add simple protection and rename messages_backup if exists (#2531) --- migrations/message_store_postgres/content_script_version_2.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/migrations/message_store_postgres/content_script_version_2.nim b/migrations/message_store_postgres/content_script_version_2.nim index 674e9993d..4065a26c6 100644 --- a/migrations/message_store_postgres/content_script_version_2.nim +++ b/migrations/message_store_postgres/content_script_version_2.nim @@ -1,4 +1,5 @@ const ContentScriptVersion_2* = """ +ALTER TABLE IF EXISTS messages_backup RENAME TO messages; ALTER TABLE messages RENAME TO messages_backup; ALTER TABLE messages_backup DROP CONSTRAINT messageIndex;