summary refs log tree commit diff
path: root/src/util/migration/postgres/1772404321402-EmbedCacheCreatedAt.ts
blob: bf845ff74980cd4fa329ba26b91eb8dd52500051 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { MigrationInterface, QueryRunner } from "typeorm";

export class EmbedCacheCreatedAt1772404321402 implements MigrationInterface {
    name = "EmbedCacheCreatedAt1772404321402";

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE "embed_cache" ADD "created_at" timestamp with time zone DEFAULT now();`);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE "embed_cache" DROP COLUMN "created_at"`);
    }
}