import { MigrationInterface, QueryRunner } from "typeorm"; export class ProjectSettings1760377023483 implements MigrationInterface { name = "ProjectSettings1760377023483"; public async up(queryRunner: QueryRunner): Promise { await queryRunner.query( `CREATE TABLE \`projectSetting\` (\`id\` varchar(36) NOT NULL, \`key\` varchar(255) NOT NULL, \`value\` text NOT NULL, \`projectId\` varchar(36) NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB` ); await queryRunner.query( `ALTER TABLE \`projectSetting\` ADD CONSTRAINT \`FK_8dfaf9c1ebbadb7af024e72e871\` FOREIGN KEY (\`projectId\`) REFERENCES \`project\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION` ); } public async down(queryRunner: QueryRunner): Promise { await queryRunner.query( `ALTER TABLE \`projectSetting\` DROP FOREIGN KEY \`FK_8dfaf9c1ebbadb7af024e72e871\`` ); await queryRunner.query(`DROP TABLE \`projectSetting\``); } }