summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-23 08:32:16 +0100
committerRory& <root@rory.gay>2026-02-23 08:32:16 +0100
commit785f53e7d1f485941e47f13f4558f9568571f9b0 (patch)
treeeaeedb2997ebd05844d27bf47f44bc0ada2b26b4
parentcdn: fix (diff)
downloadserver-ts-785f53e7d1f485941e47f13f4558f9568571f9b0.tar.xz
swap migration order
-rw-r--r--src/util/migration/postgres/1771825341528-MoreReadStateFields.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/migration/postgres/1771825341528-MoreReadStateFields.ts b/src/util/migration/postgres/1771825341528-MoreReadStateFields.ts

index 3b0d05af..30b6c3b0 100644 --- a/src/util/migration/postgres/1771825341528-MoreReadStateFields.ts +++ b/src/util/migration/postgres/1771825341528-MoreReadStateFields.ts
@@ -9,13 +9,13 @@ export class MoreReadStateFields1771825341528 implements MigrationInterface { await queryRunner.query(`ALTER TABLE "read_states" ADD "badge_count" integer NOT NULL DEFAULT '0'`); await queryRunner.query(`ALTER TABLE "read_states" ADD "read_state_type" integer NOT NULL DEFAULT '0'`); await queryRunner.query(`ALTER TABLE "read_states" ADD "flags" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "read_states" ALTER COLUMN "mention_count" SET NOT NULL`); await queryRunner.query(`ALTER TABLE "read_states" ALTER COLUMN "mention_count" SET DEFAULT '0'`); + await queryRunner.query(`ALTER TABLE "read_states" ALTER COLUMN "mention_count" SET NOT NULL`); } public async down(queryRunner: QueryRunner): Promise<void> { - await queryRunner.query(`ALTER TABLE "read_states" ALTER COLUMN "mention_count" DROP DEFAULT`); await queryRunner.query(`ALTER TABLE "read_states" ALTER COLUMN "mention_count" DROP NOT NULL`); + await queryRunner.query(`ALTER TABLE "read_states" ALTER COLUMN "mention_count" DROP DEFAULT`); await queryRunner.query(`ALTER TABLE "read_states" DROP COLUMN "flags"`); await queryRunner.query(`ALTER TABLE "read_states" DROP COLUMN "read_state_type"`); await queryRunner.query(`ALTER TABLE "read_states" DROP COLUMN "badge_count"`);