mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-28 12:13:23 +00:00
fix: update pinned column value in down migration
This commit is contained in:
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`,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user