fix: update pinned column value in down migration
This commit is contained in:
parent
8e18a642fe
commit
9662b587e3
@ -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`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user