Merge branch 'develop' of github.com:Frappet/bma-ehr-development into develop
This commit is contained in:
commit
37bf71aca5
6 changed files with 317 additions and 0 deletions
38
src/entities/StrategyChild1.ts
Normal file
38
src/entities/StrategyChild1.ts
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { StrategyChild2 } from "./StrategyChild2";
|
||||
import { StrategyChild3 } from "./StrategyChild3";
|
||||
import { StrategyChild4 } from "./StrategyChild4";
|
||||
import { StrategyChild5 } from "./StrategyChild5";
|
||||
|
||||
|
||||
@Entity("strategyChild1")
|
||||
export class StrategyChild1 extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อยุทธศาสตร์",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
strategyChild1Name: string;
|
||||
|
||||
@OneToMany(() => StrategyChild2, (strategyChild2) => strategyChild2.strategyChild1)
|
||||
strategyChild2s: StrategyChild2[];
|
||||
|
||||
@OneToMany(() => StrategyChild3, (strategyChild3) => strategyChild3.strategyChild1)
|
||||
strategyChild3s: StrategyChild3[];
|
||||
|
||||
@OneToMany(() => StrategyChild4, (strategyChild4) => strategyChild4.strategyChild1)
|
||||
strategyChild4s: StrategyChild4[];
|
||||
|
||||
@OneToMany(() => StrategyChild5, (strategyChild5) => strategyChild5.strategyChild1)
|
||||
strategyChild5s: StrategyChild5[];
|
||||
|
||||
}
|
||||
|
||||
export class CreateStrategyChild1 {
|
||||
@Column()
|
||||
strategyChild1Name: string;
|
||||
}
|
||||
|
||||
export type UpdateStrategyChild1 = Partial<CreateStrategyChild1>;
|
||||
50
src/entities/StrategyChild2.ts
Normal file
50
src/entities/StrategyChild2.ts
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { StrategyChild1 } from "./StrategyChild1";
|
||||
import { StrategyChild3 } from "./StrategyChild3";
|
||||
import { StrategyChild4 } from "./StrategyChild4";
|
||||
import { StrategyChild5 } from "./StrategyChild5";
|
||||
|
||||
|
||||
@Entity("strategyChild2")
|
||||
export class StrategyChild2 extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อยุทธศาสตร์/แผน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
strategyChild2Name: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild1",
|
||||
})
|
||||
strategyChild1Id: string;
|
||||
|
||||
@ManyToOne(() => StrategyChild1, (strategyChild1) => strategyChild1.strategyChild2s)
|
||||
@JoinColumn({ name: "strategyChild1Id" })
|
||||
strategyChild1: StrategyChild1;
|
||||
|
||||
@OneToMany(() => StrategyChild3, (strategyChild3) => strategyChild3.strategyChild2)
|
||||
strategyChild3s: StrategyChild3[];
|
||||
|
||||
@OneToMany(() => StrategyChild4, (strategyChild4) => strategyChild4.strategyChild2)
|
||||
strategyChild4s: StrategyChild4[];
|
||||
|
||||
@OneToMany(() => StrategyChild5, (strategyChild5) => strategyChild5.strategyChild2)
|
||||
strategyChild5s: StrategyChild5[];
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
export class CreateStrategyChild2 {
|
||||
@Column()
|
||||
strategyChild2Name: string;
|
||||
|
||||
@Column("uuid")
|
||||
strategyChild1Id: string;
|
||||
}
|
||||
|
||||
export type UpdateStrategyChild2 = Partial<CreateStrategyChild2>;
|
||||
55
src/entities/StrategyChild3.ts
Normal file
55
src/entities/StrategyChild3.ts
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { StrategyChild1 } from "./StrategyChild1";
|
||||
import { StrategyChild2 } from "./StrategyChild2";
|
||||
import { StrategyChild4 } from "./StrategyChild4";
|
||||
import { StrategyChild5 } from "./StrategyChild5";
|
||||
|
||||
|
||||
@Entity("strategyChild3")
|
||||
export class StrategyChild3 extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ยุทธศาสตร์ที่",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
strategyChild3Name: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild1",
|
||||
})
|
||||
strategyChild1Id: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild2",
|
||||
})
|
||||
strategyChild2Id: string;
|
||||
|
||||
@ManyToOne(() => StrategyChild1, (strategyChild1) => strategyChild1.strategyChild3s)
|
||||
@JoinColumn({ name: "strategyChild1Id" })
|
||||
strategyChild1: StrategyChild1;
|
||||
|
||||
@ManyToOne(() => StrategyChild2, (strategyChild2) => strategyChild2.strategyChild3s)
|
||||
@JoinColumn({ name: "strategyChild2Id" })
|
||||
strategyChild2: StrategyChild2;
|
||||
|
||||
@OneToMany(() => StrategyChild4, (strategyChild4) => strategyChild4.strategyChild3)
|
||||
strategyChild4s: StrategyChild4[];
|
||||
|
||||
@OneToMany(() => StrategyChild5, (strategyChild5) => strategyChild5.strategyChild3)
|
||||
strategyChild5s: StrategyChild5[];
|
||||
|
||||
}
|
||||
|
||||
export class CreateStrategyChild3 {
|
||||
@Column()
|
||||
strategyChild3Name: string;
|
||||
|
||||
@Column("uuid")
|
||||
strategyChild2Id: string;
|
||||
}
|
||||
|
||||
export type UpdateStrategyChild3 = Partial<CreateStrategyChild3>;
|
||||
62
src/entities/StrategyChild4.ts
Normal file
62
src/entities/StrategyChild4.ts
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { StrategyChild1 } from "./StrategyChild1";
|
||||
import { StrategyChild2 } from "./StrategyChild2";
|
||||
import { StrategyChild3 } from "./StrategyChild3";
|
||||
import { StrategyChild5 } from "./StrategyChild5";
|
||||
|
||||
|
||||
@Entity("strategyChild4")
|
||||
export class StrategyChild4 extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ยุทธศาสตร์ย่อยที่",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
strategyChild4Name: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild1",
|
||||
})
|
||||
strategyChild1Id: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild2",
|
||||
})
|
||||
strategyChild2Id: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild3",
|
||||
})
|
||||
strategyChild3Id: string;
|
||||
|
||||
@ManyToOne(() => StrategyChild1, (strategyChild1) => strategyChild1.strategyChild4s)
|
||||
@JoinColumn({ name: "strategyChild1Id" })
|
||||
strategyChild1: StrategyChild1;
|
||||
|
||||
@ManyToOne(() => StrategyChild2, (strategyChild2) => strategyChild2.strategyChild4s)
|
||||
@JoinColumn({ name: "strategyChild2Id" })
|
||||
strategyChild2: StrategyChild2;
|
||||
|
||||
@ManyToOne(() => StrategyChild3, (strategyChild3) => strategyChild3.strategyChild4s)
|
||||
@JoinColumn({ name: "strategyChild3Id" })
|
||||
strategyChild3: StrategyChild3;
|
||||
|
||||
@OneToMany(() => StrategyChild5, (strategyChild5) => strategyChild5.strategyChild4)
|
||||
strategyChild5s: StrategyChild5[];
|
||||
}
|
||||
|
||||
|
||||
export class CreateStrategyChild4 {
|
||||
@Column()
|
||||
strategyChild4Name: string;
|
||||
|
||||
@Column("uuid")
|
||||
strategyChild3Id: string;
|
||||
}
|
||||
|
||||
export type UpdateStrategyChild4 = Partial<CreateStrategyChild4>;
|
||||
70
src/entities/StrategyChild5.ts
Normal file
70
src/entities/StrategyChild5.ts
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { StrategyChild1 } from "./StrategyChild1";
|
||||
import { StrategyChild2 } from "./StrategyChild2";
|
||||
import { StrategyChild3 } from "./StrategyChild3";
|
||||
import { StrategyChild4 } from "./StrategyChild4";
|
||||
|
||||
|
||||
@Entity("strategyChild5")
|
||||
export class StrategyChild5 extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "กลยุทธ์ที่",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
strategyChild5Name: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild1",
|
||||
})
|
||||
strategyChild1Id: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild2",
|
||||
})
|
||||
strategyChild2Id: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild3",
|
||||
})
|
||||
strategyChild3Id: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild4",
|
||||
})
|
||||
strategyChild4Id: string;
|
||||
|
||||
@ManyToOne(() => StrategyChild1, (strategyChild1) => strategyChild1.strategyChild5s)
|
||||
@JoinColumn({ name: "strategyChild1Id" })
|
||||
strategyChild1: StrategyChild1;
|
||||
|
||||
@ManyToOne(() => StrategyChild2, (strategyChild2) => strategyChild2.strategyChild5s)
|
||||
@JoinColumn({ name: "strategyChild2Id" })
|
||||
strategyChild2: StrategyChild2;
|
||||
|
||||
@ManyToOne(() => StrategyChild3, (strategyChild3) => strategyChild3.strategyChild5s)
|
||||
@JoinColumn({ name: "strategyChild3Id" })
|
||||
strategyChild3: StrategyChild3;
|
||||
|
||||
@ManyToOne(() => StrategyChild4, (strategyChild4) => strategyChild4.strategyChild5s)
|
||||
@JoinColumn({ name: "strategyChild4Id" })
|
||||
strategyChild4: StrategyChild4;
|
||||
|
||||
}
|
||||
|
||||
|
||||
export class CreateStrategyChild5 {
|
||||
@Column()
|
||||
strategyChild5Name: string;
|
||||
|
||||
@Column("uuid")
|
||||
strategyChild4Id: string;
|
||||
}
|
||||
|
||||
export type UpdateStrategyChild5 = Partial<CreateStrategyChild5>;
|
||||
42
src/migration/1712810427265-add_table_starty.ts
Normal file
42
src/migration/1712810427265-add_table_starty.ts
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddTableStarty1712810427265 implements MigrationInterface {
|
||||
name = 'AddTableStarty1712810427265'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`CREATE TABLE \`strategyChild4\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`strategyChild4Name\` varchar(255) NULL COMMENT 'ยุทธศาสตร์ย่อยที่', \`strategyChild1Id\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง strategyChild1', \`strategyChild2Id\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง strategyChild2', \`strategyChild3Id\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง strategyChild3', PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`CREATE TABLE \`strategyChild3\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`strategyChild3Name\` varchar(255) NULL COMMENT 'ยุทธศาสตร์ที่', \`strategyChild1Id\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง strategyChild1', \`strategyChild2Id\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง strategyChild2', PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`CREATE TABLE \`strategyChild2\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`strategyChild2Name\` varchar(255) NULL COMMENT 'ชื่อยุทธศาสตร์/แผน', \`strategyChild1Id\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง strategyChild1', PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`CREATE TABLE \`strategyChild1\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`strategyChild1Name\` varchar(255) NULL COMMENT 'ชื่อยุทธศาสตร์', PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`CREATE TABLE \`strategyChild5\` (\`id\` varchar(36) NOT NULL, \`createdAt\` datetime(6) NOT NULL COMMENT 'สร้างข้อมูลเมื่อ' DEFAULT CURRENT_TIMESTAMP(6), \`createdUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่สร้างข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`lastUpdatedAt\` datetime(6) NOT NULL COMMENT 'แก้ไขข้อมูลล่าสุดเมื่อ' DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`lastUpdateUserId\` varchar(40) NOT NULL COMMENT 'User Id ที่แก้ไขข้อมูล' DEFAULT '00000000-0000-0000-0000-000000000000', \`createdFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่สร้างข้อมูล' DEFAULT 'string', \`lastUpdateFullName\` varchar(200) NOT NULL COMMENT 'ชื่อ User ที่แก้ไขข้อมูลล่าสุด' DEFAULT 'string', \`strategyChild5Name\` varchar(255) NULL COMMENT 'กลยุทธ์ที่', \`strategyChild1Id\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง strategyChild1', \`strategyChild2Id\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง strategyChild2', \`strategyChild3Id\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง strategyChild3', \`strategyChild4Id\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง strategyChild4', PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild4\` ADD CONSTRAINT \`FK_0066b72a1b1e1832ee4e19f1962\` FOREIGN KEY (\`strategyChild1Id\`) REFERENCES \`strategyChild1\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild4\` ADD CONSTRAINT \`FK_f22f3637349caf8ba4e96bef6a6\` FOREIGN KEY (\`strategyChild2Id\`) REFERENCES \`strategyChild2\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild4\` ADD CONSTRAINT \`FK_a02975074aac7445aced33ab99d\` FOREIGN KEY (\`strategyChild3Id\`) REFERENCES \`strategyChild3\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild3\` ADD CONSTRAINT \`FK_678c2b72214a00ba380affeb574\` FOREIGN KEY (\`strategyChild1Id\`) REFERENCES \`strategyChild1\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild3\` ADD CONSTRAINT \`FK_441c2fc2b760d1d0dfb9faca4bc\` FOREIGN KEY (\`strategyChild2Id\`) REFERENCES \`strategyChild2\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild2\` ADD CONSTRAINT \`FK_5dd11a1dac02f7368d6cd5bba34\` FOREIGN KEY (\`strategyChild1Id\`) REFERENCES \`strategyChild1\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild5\` ADD CONSTRAINT \`FK_2f396ec33e0f571a4e913ca30f3\` FOREIGN KEY (\`strategyChild1Id\`) REFERENCES \`strategyChild1\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild5\` ADD CONSTRAINT \`FK_2c2a8b73ea0fa93ebbd4d81229b\` FOREIGN KEY (\`strategyChild2Id\`) REFERENCES \`strategyChild2\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild5\` ADD CONSTRAINT \`FK_67d08068d52226bb028a0d25d36\` FOREIGN KEY (\`strategyChild3Id\`) REFERENCES \`strategyChild3\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild5\` ADD CONSTRAINT \`FK_ad2b70c3a8955e67eec6ce85085\` FOREIGN KEY (\`strategyChild4Id\`) REFERENCES \`strategyChild4\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild5\` DROP FOREIGN KEY \`FK_ad2b70c3a8955e67eec6ce85085\``);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild5\` DROP FOREIGN KEY \`FK_67d08068d52226bb028a0d25d36\``);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild5\` DROP FOREIGN KEY \`FK_2c2a8b73ea0fa93ebbd4d81229b\``);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild5\` DROP FOREIGN KEY \`FK_2f396ec33e0f571a4e913ca30f3\``);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild2\` DROP FOREIGN KEY \`FK_5dd11a1dac02f7368d6cd5bba34\``);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild3\` DROP FOREIGN KEY \`FK_441c2fc2b760d1d0dfb9faca4bc\``);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild3\` DROP FOREIGN KEY \`FK_678c2b72214a00ba380affeb574\``);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild4\` DROP FOREIGN KEY \`FK_a02975074aac7445aced33ab99d\``);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild4\` DROP FOREIGN KEY \`FK_f22f3637349caf8ba4e96bef6a6\``);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild4\` DROP FOREIGN KEY \`FK_0066b72a1b1e1832ee4e19f1962\``);
|
||||
await queryRunner.query(`DROP TABLE \`strategyChild5\``);
|
||||
await queryRunner.query(`DROP TABLE \`strategyChild1\``);
|
||||
await queryRunner.query(`DROP TABLE \`strategyChild2\``);
|
||||
await queryRunner.query(`DROP TABLE \`strategyChild3\``);
|
||||
await queryRunner.query(`DROP TABLE \`strategyChild4\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue