fix: update pinned column value in down migration

This commit is contained in:
CyberL1 authored and Rory& committed 2025-09-29 18:32:21 +02:00
1 parent 8e18a642fe
commit 9662b587e3
1 file changed
+3
@@ -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`,
);
}
}