generated from nestjs/typescript-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(hero): add equippedItem column in hero typeorm entity
- Loading branch information
Pierre Chabardes
committed
May 24, 2022
1 parent
b90e369
commit 7e57384
Showing
3 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
migrations/1653392427820-AlterHeroTableAddEquippedItemColumn.ts
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,14 @@ | ||
import {MigrationInterface, QueryRunner} from "typeorm"; | ||
|
||
export class AlterHeroTableAddEquippedItemColumn1653392427820 implements MigrationInterface { | ||
name = 'AlterHeroTableAddEquippedItemColumn1653392427820' | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "hero" ADD "equippedItem" character varying`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "hero" DROP COLUMN "equippedItem"`); | ||
} | ||
|
||
} |
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
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