summary refs log tree commit diff
path: root/src/util/migration/postgres
diff options
context:
space:
mode:
authorCyberL1 <cyber.hf18@gmail.com>2025-07-13 07:30:17 +0200
committerRory& <root@rory.gay>2025-09-29 18:32:21 +0200
commitb8b461f0dba77eb0714fa8af3d33c92e376fdc0f (patch)
tree8f77a8c750e4cab628a7a7dbf9e02f198daf1412 /src/util/migration/postgres
parentRemove @everyone role from `onIdentify` (diff)
downloadserver-ts-b8b461f0dba77eb0714fa8af3d33c92e376fdc0f.tar.xz
fix: getting message pinss
Diffstat (limited to 'src/util/migration/postgres')
-rw-r--r--src/util/migration/postgres/1752383879533-message_pinned_at.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util/migration/postgres/1752383879533-message_pinned_at.ts b/src/util/migration/postgres/1752383879533-message_pinned_at.ts
new file mode 100644

index 00000000..f96d284c --- /dev/null +++ b/src/util/migration/postgres/1752383879533-message_pinned_at.ts
@@ -0,0 +1,17 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class MessagePinnedAt1752383879533 implements MigrationInterface { + name = "MessagePinnedAt1752383879533"; + + public async up(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query( + `ALTER TABLE "messages" ADD "pinned_at" TIMESTAMP`, + ); + } + + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query( + `ALTER TABLE "messages" DROP COLUMN "pinned_at"`, + ); + } +}