summary refs log tree commit diff
path: root/src/util/migration/postgres/1772404321402-EmbedCacheCreatedAt.ts
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-03-26 11:46:48 +0100
committerRory& <root@rory.gay>2026-03-26 11:46:48 +0100
commitdaaf6eae286605e5ddd926fe13956edce5d2c08b (patch)
tree3d53af2aff50659710de41a2f7f57915a117ae01 /src/util/migration/postgres/1772404321402-EmbedCacheCreatedAt.ts
parentFix voice state query trying to include member (diff)
downloadserver-ts-daaf6eae286605e5ddd926fe13956edce5d2c08b.tar.xz
Embeds: factor out from postMessage
Diffstat (limited to 'src/util/migration/postgres/1772404321402-EmbedCacheCreatedAt.ts')
-rw-r--r--src/util/migration/postgres/1772404321402-EmbedCacheCreatedAt.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util/migration/postgres/1772404321402-EmbedCacheCreatedAt.ts b/src/util/migration/postgres/1772404321402-EmbedCacheCreatedAt.ts
new file mode 100644

index 00000000..bf845ff7 --- /dev/null +++ b/src/util/migration/postgres/1772404321402-EmbedCacheCreatedAt.ts
@@ -0,0 +1,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"`); + } +}