add fields
This commit is contained in:
parent
97f1fc0a98
commit
35fb72e45d
4 changed files with 46 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class Update3table_addAmountSpecial1733471256767 implements MigrationInterface {
|
||||
name = 'Update3table_addAmountSpecial1733471256767'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`amountSpecial\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`amountSpecial\``);
|
||||
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`amountSpecial\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`amountSpecial\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`amountSpecial\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue