iceshrimp/packages/backend/src/migration/1683682889948-PreventAiLearning.ts
2023-10-13 18:44:25 +02:00

16 lines
511 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class PreventAiLearning1683682889948 implements MigrationInterface {
name = "PreventAiLearning1683682889948";
async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "user_profile" ADD "preventAiLearning" boolean NOT NULL DEFAULT true`,
);
}
async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "user_profile" DROP COLUMN "preventAiLearning"`,
);
}
}