hippofish/packages/backend/src/migration/1682777547198-LibreTranslate.ts

24 lines
661 B
TypeScript
Raw Normal View History

import type { MigrationInterface, QueryRunner } from "typeorm";
2023-04-30 03:09:51 +02:00
export class LibreTranslate1682777547198 implements MigrationInterface {
async up(queryRunner: QueryRunner): Promise<void> {
2023-04-30 03:09:51 +02:00
await queryRunner.query(`
ALTER TABLE "meta"
ADD "libreTranslateApiUrl" character varying(512)
`);
await queryRunner.query(`
ALTER TABLE "meta"
ADD "libreTranslateApiKey" character varying(128)
`);
}
async down(queryRunner: QueryRunner): Promise<void> {
2023-04-30 03:09:51 +02:00
await queryRunner.query(`
ALTER TABLE "meta" DROP COLUMN "libreTranslateApiKey"
`);
await queryRunner.query(`
ALTER TABLE "meta" DROP COLUMN "libreTranslateApiUrl"
`);
}
}