summary refs log tree commit diff
path: root/src/util/migration/postgres
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-13 23:41:48 +0100
committerRory& <root@rory.gay>2025-12-13 23:41:48 +0100
commit4bb3ff1aaee9a1c81bd36646ed1c3b6d214d94bc (patch)
tree812ec503f905ec6944d900c465305b5d15c6cca5 /src/util/migration/postgres
parentUpdate admin api db model to match TS (diff)
downloadserver-ts-4bb3ff1aaee9a1c81bd36646ed1c3b6d214d94bc.tar.xz
Drop nonfunctional default ipdata key
Diffstat (limited to 'src/util/migration/postgres')
-rw-r--r--src/util/migration/postgres/1765665440000-DropDefaultIPDataKey.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/util/migration/postgres/1765665440000-DropDefaultIPDataKey.ts b/src/util/migration/postgres/1765665440000-DropDefaultIPDataKey.ts
new file mode 100644

index 000000000..ad1b736f7 --- /dev/null +++ b/src/util/migration/postgres/1765665440000-DropDefaultIPDataKey.ts
@@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class DropDefaultIPDataKey1765665440000 implements MigrationInterface { + name = 'DropDefaultIPDataKey1765665440000' + + public async up(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`UPDATE "config" SET "value" = NULL WHERE "key" = 'security_ipdataApiKey' AND "value" = '"eca677b284b3bac29eb72f5e496aa9047f26543605efe99ff2ce35c9"'`); + } + + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`UPDATE "config" SET "value" = '"eca677b284b3bac29eb72f5e496aa9047f26543605efe99ff2ce35c9"' WHERE "key" = 'security_ipdataApiKey' AND "value" IS NULL`); + } + +}