summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-03 03:31:43 +0100
committerRory& <root@rory.gay>2026-02-03 03:31:43 +0100
commit3774ebb70bb5006bbbdbf0576cc4c523992f2010 (patch)
treee9d74363421432f5e0ea421d65525825c977b4ad
parentcdn: avatar decorations (diff)
downloadserver-ts-3774ebb70bb5006bbbdbf0576cc4c523992f2010.tar.xz
try catch a migration line
-rw-r--r--src/util/migration/postgres/1770079838835-MemberProfileCustomisation.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/util/migration/postgres/1770079838835-MemberProfileCustomisation.ts b/src/util/migration/postgres/1770079838835-MemberProfileCustomisation.ts

index 740391ee..25ed7e25 100644 --- a/src/util/migration/postgres/1770079838835-MemberProfileCustomisation.ts +++ b/src/util/migration/postgres/1770079838835-MemberProfileCustomisation.ts
@@ -6,7 +6,11 @@ export class MemberProfileCustomisation1770079838835 implements MigrationInterfa public async up(queryRunner: QueryRunner): Promise<void> { // just gonna let typeorm do its thing for once... await queryRunner.query(`ALTER TABLE "thread_members" DROP CONSTRAINT "FK_606ac45e8756d3440c584477f4e"`); - await queryRunner.query(`ALTER TABLE "webhooks" DROP CONSTRAINT "fk_d64f38834fa676f6caa4786ddd6"`); + try { + await queryRunner.query(`ALTER TABLE "webhooks" DROP CONSTRAINT "fk_d64f38834fa676f6caa4786ddd6"`); + } catch { + /* empty */ + } await queryRunner.query(`DROP INDEX "public"."IDX_bde0970b6a26bdbd83508addd2"`); await queryRunner.query(`ALTER TABLE "members" ADD "avatar_decoration_data" text`); await queryRunner.query(`ALTER TABLE "members" ADD "display_name_styles" text`); @@ -27,9 +31,6 @@ export class MemberProfileCustomisation1770079838835 implements MigrationInterfa await queryRunner.query(`ALTER TABLE "members" DROP COLUMN "avatar_decoration_data"`); await queryRunner.query(`CREATE UNIQUE INDEX "IDX_bde0970b6a26bdbd83508addd2" ON "thread_members" ("id", "member_idx") `); await queryRunner.query( - `ALTER TABLE "webhooks" ADD CONSTRAINT "fk_d64f38834fa676f6caa4786ddd6" FOREIGN KEY ("source_channel_id") REFERENCES "channels"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, - ); - await queryRunner.query( `ALTER TABLE "thread_members" ADD CONSTRAINT "FK_606ac45e8756d3440c584477f4e" FOREIGN KEY ("member_idx") REFERENCES "members"("index") ON DELETE CASCADE ON UPDATE NO ACTION`, ); }