isReserve ว่างได้
This commit is contained in:
parent
93d4ffa7a6
commit
24744f7f32
3 changed files with 28 additions and 8 deletions
|
|
@ -0,0 +1,20 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableSalaryProfileIsPunishNullable1709802836209 implements MigrationInterface {
|
||||
name = 'UpdateTableSalaryProfileIsPunishNullable1709802836209'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isPunish\` \`isPunish\` tinyint NULL COMMENT 'การลงโทษทางวินัย'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isSuspension\` \`isSuspension\` tinyint NULL COMMENT 'พักราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isAbsent\` \`isAbsent\` tinyint NULL COMMENT 'ขาดราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isLeave\` \`isLeave\` tinyint NULL COMMENT 'วันลา'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isLeave\` \`isLeave\` tinyint NULL COMMENT 'วันลา' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isAbsent\` \`isAbsent\` tinyint NULL COMMENT 'ขาดราชการ' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isSuspension\` \`isSuspension\` tinyint NULL COMMENT 'พักราชการ' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isPunish\` \`isPunish\` tinyint NULL COMMENT 'การลงโทษทางวินัย' DEFAULT '0'`);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue