2024-04-07 05:38:52 +02:00
|
|
|
import type { MigrationInterface, QueryRunner } from "typeorm";
|
2023-07-03 01:20:40 +02:00
|
|
|
|
2024-03-03 05:20:32 +01:00
|
|
|
export class AddMetaOptions1688280713783 implements MigrationInterface {
|
|
|
|
async up(queryRunner: QueryRunner): Promise<void> {
|
2023-07-03 01:20:40 +02:00
|
|
|
await queryRunner.query(
|
|
|
|
`ALTER TABLE "meta" ADD "enableServerMachineStats" boolean NOT NULL DEFAULT false`,
|
|
|
|
);
|
|
|
|
await queryRunner.query(
|
|
|
|
`ALTER TABLE "meta" ADD "enableIdenticonGeneration" boolean NOT NULL DEFAULT true`,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2024-03-03 05:20:32 +01:00
|
|
|
async down(queryRunner: QueryRunner): Promise<void> {
|
2023-07-03 01:20:40 +02:00
|
|
|
await queryRunner.query(
|
|
|
|
`ALTER TABLE "meta" DROP COLUMN "enableIdenticonGeneration"`,
|
|
|
|
);
|
|
|
|
await queryRunner.query(
|
|
|
|
`ALTER TABLE "meta" DROP COLUMN "enableServerMachineStats"`,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|