migration profileSalaryHistory
This commit is contained in:
parent
da6c407678
commit
d29a4a4747
2 changed files with 24 additions and 0 deletions
14
src/migration/1733798795372-update_table_add_field.ts
Normal file
14
src/migration/1733798795372-update_table_add_field.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableAddField1733798795372 implements MigrationInterface {
|
||||
name = 'UpdateTableAddField1733798795372'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` DROP COLUMN \`amountSpecial\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue