From d2c8292ad78a70e1eb85758f1cb6e4f89e64fbe6 Mon Sep 17 00:00:00 2001 From: Namekuji Date: Fri, 22 Sep 2023 17:18:46 -0400 Subject: [PATCH] fix: note table does not exist if scylla has been set up --- packages/backend/migration/1695334243217-add-post-lang.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/migration/1695334243217-add-post-lang.js b/packages/backend/migration/1695334243217-add-post-lang.js index 7e8618953a..47093e2dce 100644 --- a/packages/backend/migration/1695334243217-add-post-lang.js +++ b/packages/backend/migration/1695334243217-add-post-lang.js @@ -3,11 +3,11 @@ export class AddPostLang1695334243217 { async up(queryRunner) { await queryRunner.query( - `ALTER TABLE "note" ADD "lang" character varying(10)`, + `ALTER TABLE IF EXISTS "note" ADD "lang" character varying(10)`, ); } async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "lang"`); + await queryRunner.query(`ALTER TABLE IF EXISTS "note" DROP COLUMN "lang"`); } }