-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3117d30
commit 406f301
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const { MigrationInterface, QueryRunner } = require("typeorm"); | ||
|
||
module.exports = class addUserDataTransaction1735574957300 { | ||
name = 'addUserDataTransaction1735574957300' | ||
|
||
async up(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "dbo"."transaction" ADD "userDataId" int`); | ||
await queryRunner.query(`ALTER TABLE "dbo"."transaction" ADD CONSTRAINT "FK_1e5036f71c59cd6e514280f2719" FOREIGN KEY ("userDataId") REFERENCES "user_data"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "dbo"."transaction" DROP CONSTRAINT "FK_1e5036f71c59cd6e514280f2719"`); | ||
await queryRunner.query(`ALTER TABLE "dbo"."transaction" DROP COLUMN "userDataId"`); | ||
} | ||
} |