mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-15 09:01:40 +00:00
16 lines
720 B
TypeScript
16 lines
720 B
TypeScript
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`);
|
|
}
|
|
}
|