summary refs log tree commit diff
path: root/src/util/migration/postgres
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-10-19 18:13:54 +0200
committerRory& <root@rory.gay>2025-10-19 18:13:54 +0200
commitd0ae4d06bccf109fad95efb9f2904a009b1fb1ec (patch)
tree292072803faf5e8bca76bd5272bd84930fae8013 /src/util/migration/postgres
parentSynchronously save automod message (diff)
downloadserver-ts-d0ae4d06bccf109fad95efb9f2904a009b1fb1ec.tar.xz
Make reconicle migration not suck
Diffstat (limited to 'src/util/migration/postgres')
-rw-r--r--src/util/migration/postgres/1760622755599-ReconcileMigrationAttempts.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util/migration/postgres/1760622755599-ReconcileMigrationAttempts.ts b/src/util/migration/postgres/1760622755599-ReconcileMigrationAttempts.ts

index d38f0d8c1..736030594 100644 --- a/src/util/migration/postgres/1760622755599-ReconcileMigrationAttempts.ts +++ b/src/util/migration/postgres/1760622755599-ReconcileMigrationAttempts.ts
@@ -4,7 +4,8 @@ export class ReconcileMigrationAttempts1760622755598 implements MigrationInterfa name = 'ReconcileMigrationAttempts1760622755598' public async up(queryRunner: QueryRunner): Promise<void> { - await queryRunner.query(`ALTER TABLE "webhooks" DROP CONSTRAINT "fk_d64f38834fa676f6caa4786ddd6"`); + // doesnt work because initial setup is syncDb() + //await queryRunner.query(`ALTER TABLE "webhooks" DROP CONSTRAINT "fk_d64f38834fa676f6caa4786ddd6"`); await queryRunner.query(`ALTER TABLE "webhooks" ALTER COLUMN "source_channel_id" TYPE character varying`); await queryRunner.query(`ALTER TABLE "messages" ALTER COLUMN "username" TYPE character varying`); await queryRunner.query(`ALTER TABLE "messages" ALTER COLUMN "avatar" TYPE character varying`); @@ -47,7 +48,7 @@ export class ReconcileMigrationAttempts1760622755598 implements MigrationInterfa await queryRunner.query(`ALTER TABLE "messages" ALTER COLUMN "username" TYPE text`); await queryRunner.query(`ALTER TABLE "webhooks" ALTER COLUMN "source_channel_id" TYPE character varying(255)`); await queryRunner.query(`ALTER TABLE "webhooks" ALTER COLUMN "source_channel_id" SET DEFAULT NULL`); - 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 "webhooks" ADD CONSTRAINT "fk_d64f38834fa676f6caa4786ddd6" FOREIGN KEY ("source_channel_id") REFERENCES "channels"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); } -} +} \ No newline at end of file