dumb migration

This commit is contained in:
murdle 2025-12-21 15:17:14 +02:00
parent 6a70375fa8
commit 16040b897a
3 changed files with 12 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@ -15,7 +15,18 @@ export class MakeKeysNullable1766283926503 implements MigrationInterface {
await queryRunner.query(`
ALTER TABLE "push_subscriptions"
ADD COLUMN "type" text NOT NULL DEFAULT 'webpush';
ADD COLUMN "type" text;
`);
await queryRunner.query(`
UPDATE "push_subscriptions"
SET "type" = 'webpush'
WHERE "type" IS NULL;
`);
await queryRunner.query(`
ALTER TABLE "push_subscriptions"
ALTER COLUMN "type" SET NOT NULL;
`);
}
@ -35,5 +46,4 @@ export class MakeKeysNullable1766283926503 implements MigrationInterface {
ALTER COLUMN "p256dh" SET NOT NULL;
`);
}
}