1 files changed, 15 insertions, 0 deletions
diff --git a/src/database/migration/postgres/1771997061671-LastPinTimestampAsDate.ts b/src/database/migration/postgres/1771997061671-LastPinTimestampAsDate.ts
new file mode 100644
index 00000000..a5aaf474
--- /dev/null
+++ b/src/database/migration/postgres/1771997061671-LastPinTimestampAsDate.ts
@@ -0,0 +1,15 @@
+import { MigrationInterface, QueryRunner } from "typeorm";
+
+export class LastPinTimestampAsDate1771997061671 implements MigrationInterface {
+ name = "LastPinTimestampAsDate1771997061671";
+
+ public async up(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(`ALTER TABLE "channels" DROP COLUMN "last_pin_timestamp"`);
+ await queryRunner.query(`ALTER TABLE "channels" ADD "last_pin_timestamp" TIMESTAMP WITH TIME ZONE`);
+ }
+
+ public async down(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(`ALTER TABLE "channels" DROP COLUMN "last_pin_timestamp"`);
+ await queryRunner.query(`ALTER TABLE "channels" ADD "last_pin_timestamp" integer`);
+ }
+}
|