migrate
This commit is contained in:
parent
c0e38237a6
commit
a648fb3f24
1 changed files with 14 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateDevorderAddRelationProvince1734583427091 implements MigrationInterface {
|
||||||
|
name = 'UpdateDevorderAddRelationProvince1734583427091'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`developmentOther\` ADD CONSTRAINT \`FK_d5dfdb7ca0d11c0cdf3b3a55e6f\` FOREIGN KEY (\`developmentId\`) REFERENCES \`province\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`developmentOther\` DROP FOREIGN KEY \`FK_d5dfdb7ca0d11c0cdf3b3a55e6f\``);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue