migrate db
This commit is contained in:
parent
185fcf1756
commit
c42256a5b7
1 changed files with 14 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTablePosAddIsSpecial1708424171885 implements MigrationInterface {
|
||||
name = 'UpdateTablePosAddIsSpecial1708424171885'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salarys\` ADD \`isSpecial\` tinyint NOT NULL COMMENT 'ฉ' DEFAULT 0`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salarys\` DROP COLUMN \`isSpecial\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue