diff --git a/assets/openapi.json b/assets/openapi.json index c035798e..f16c1537 100644 Binary files a/assets/openapi.json and b/assets/openapi.json differ diff --git a/assets/schemas.json b/assets/schemas.json index 20c7771e..91ce8548 100644 Binary files a/assets/schemas.json and b/assets/schemas.json differ diff --git a/src/util/migration/postgres/1766283926503-makeKeysNullable.ts b/src/util/migration/postgres/1766283926503-makeKeysNullable.ts index 41ed2339..dd5b9ace 100644 --- a/src/util/migration/postgres/1766283926503-makeKeysNullable.ts +++ b/src/util/migration/postgres/1766283926503-makeKeysNullable.ts @@ -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; `); } - } \ No newline at end of file