dumb migration
This commit is contained in:
parent
6a70375fa8
commit
16040b897a
Binary file not shown.
Binary file not shown.
@ -15,7 +15,18 @@ export class MakeKeysNullable1766283926503 implements MigrationInterface {
|
|||||||
|
|
||||||
await queryRunner.query(`
|
await queryRunner.query(`
|
||||||
ALTER TABLE "push_subscriptions"
|
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;
|
ALTER COLUMN "p256dh" SET NOT NULL;
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user