mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
Add !deletecase
This commit is contained in:
parent
8826b2521d
commit
ddbbc543c2
9 changed files with 146 additions and 6 deletions
|
@ -0,0 +1,22 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
import { TableForeignKey } from "typeorm/index";
|
||||
|
||||
export class AddCaseNotesForeignKey1596994103885 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<any> {
|
||||
await queryRunner.createForeignKey(
|
||||
"case_notes",
|
||||
new TableForeignKey({
|
||||
name: "case_notes_case_id_fk",
|
||||
columnNames: ["case_id"],
|
||||
referencedTableName: "cases",
|
||||
referencedColumnNames: ["id"],
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "CASCADE",
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<any> {
|
||||
await queryRunner.dropForeignKey("case_notes", "case_notes_case_id_fk");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue