2024-04-07 05:38:52 +02:00
|
|
|
import type { MigrationInterface, QueryRunner } from "typeorm";
|
2023-04-30 03:09:51 +02:00
|
|
|
|
2024-03-03 05:20:32 +01: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)
|
|
|
|
`);
|
|
|
|
}
|
|
|
|
|
2024-03-03 05:20:32 +01:00
|
|
|
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"
|
|
|
|
`);
|
|
|
|
}
|
|
|
|
}
|