import { MigrationInterface, QueryRunner } from "typeorm"; export class UpdateTableProfileInsigniaRelation1710758420804 implements MigrationInterface { name = 'UpdateTableProfileInsigniaRelation1710758420804' public async up(queryRunner: QueryRunner): Promise { await queryRunner.query(`ALTER TABLE \`profileInsignia\` DROP COLUMN \`insigniaType\``); await queryRunner.query(`ALTER TABLE \`profileInsignia\` ADD CONSTRAINT \`FK_7048ee3f58edbb05c9ab4e36a8d\` FOREIGN KEY (\`insigniaId\`) REFERENCES \`insignia\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`); } public async down(queryRunner: QueryRunner): Promise { await queryRunner.query(`ALTER TABLE \`profileInsignia\` DROP FOREIGN KEY \`FK_7048ee3f58edbb05c9ab4e36a8d\``); await queryRunner.query(`ALTER TABLE \`profileInsignia\` ADD \`insigniaType\` text NULL COMMENT 'ประเภท'`); } }