From 46d43212c5710c46fbd696be77da702d21aebf94 Mon Sep 17 00:00:00 2001 From: MTRNord Date: Wed, 1 Nov 2023 20:08:07 +0100 Subject: [PATCH] Fix migrations --- .../postgres_migrations/20230728235740_modsequences.up.sql | 2 +- .../20230731143004_scope_uid_to_folder.up.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/erooster_core/postgres_migrations/20230728235740_modsequences.up.sql b/crates/erooster_core/postgres_migrations/20230728235740_modsequences.up.sql index 74a95a0e..99463fe5 100644 --- a/crates/erooster_core/postgres_migrations/20230728235740_modsequences.up.sql +++ b/crates/erooster_core/postgres_migrations/20230728235740_modsequences.up.sql @@ -3,4 +3,4 @@ -- SPDX-License-Identifier: Apache-2.0 ALTER TABLE mails -ADD COLUMN modseq BIGSERIAL NOT NULL; \ No newline at end of file +ADD COLUMN IF NOT EXISTS modseq BIGSERIAL NOT NULL; \ No newline at end of file diff --git a/crates/erooster_core/postgres_migrations/20230731143004_scope_uid_to_folder.up.sql b/crates/erooster_core/postgres_migrations/20230731143004_scope_uid_to_folder.up.sql index 29b6317b..068ed22b 100644 --- a/crates/erooster_core/postgres_migrations/20230731143004_scope_uid_to_folder.up.sql +++ b/crates/erooster_core/postgres_migrations/20230731143004_scope_uid_to_folder.up.sql @@ -3,8 +3,8 @@ -- SPDX-License-Identifier: Apache-2.0 ALTER TABLE mails - ADD "uid" BIGINT NOT NULL DEFAULT 0, - ADD "mailbox" VARCHAR DEFAULT 'unknown' NOT NULL; + ADD COLUMN IF NOT EXISTS uid BIGINT NOT NULL DEFAULT 0, + ADD COLUMN mailbox IF NOT EXISTS VARCHAR DEFAULT 'unknown' NOT NULL; create table IF NOT EXISTS mailbox_uid_counter (