fix: update pinned column value in down migration

This commit is contained in:
CyberL1 2025-09-29 07:50:46 +02:00 committed by Rory&
parent 8e18a642fe
commit 9662b587e3

View File

@ -18,5 +18,8 @@ export class MessagePinnedAt1752383879533 implements MigrationInterface {
`ALTER TABLE "messages" DROP COLUMN "pinned_at"`,
);
await queryRunner.query(`ALTER TABLE "messages" ADD "pinned" boolean`);
await queryRunner.query(
`UPDATE "messages" SET "pinned" = true WHERE "pinned_at" IS NOT NULL`,
);
}
}