diff --git a/src/util/migration/postgres/1752383879533-message_pinned_at.ts b/src/util/migration/postgres/1752383879533-message_pinned_at.ts index 9736f55..2e294aa 100644 --- a/src/util/migration/postgres/1752383879533-message_pinned_at.ts +++ b/src/util/migration/postgres/1752383879533-message_pinned_at.ts @@ -18,5 +18,8 @@ `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`, + ); } }