Merge branch 'develop' of github.com:Frappet/bma-ehr-organization into develop

This commit is contained in:
Kittapath 2024-06-12 10:45:30 +07:00
commit 17b3f0aab4
3 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,22 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableRoleAddNode1718163843179 implements MigrationInterface {
name = 'UpdateTableRoleAddNode1718163843179'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`employeePosMaster\` ADD \`isDirector\` tinyint NOT NULL COMMENT 'เป็นผู้อำนวยการ' DEFAULT 0`);
await queryRunner.query(`ALTER TABLE \`employeePosMaster\` ADD \`isOfficer\` tinyint NOT NULL COMMENT 'เป็นเจ้าหน้าที่' DEFAULT 0`);
await queryRunner.query(`ALTER TABLE \`posMaster\` ADD \`isDirector\` tinyint NOT NULL COMMENT 'เป็นผู้อำนวยการ' DEFAULT 0`);
await queryRunner.query(`ALTER TABLE \`posMaster\` ADD \`isOfficer\` tinyint NOT NULL COMMENT 'เป็นเจ้าหน้าที่' DEFAULT 0`);
await queryRunner.query(`ALTER TABLE \`authRoleAttr\` ADD \`parentNode\` varchar(255) NULL COMMENT 'Root'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`authRoleAttr\` DROP COLUMN \`parentNode\``);
await queryRunner.query(`ALTER TABLE \`posMaster\` DROP COLUMN \`isOfficer\``);
await queryRunner.query(`ALTER TABLE \`posMaster\` DROP COLUMN \`isDirector\``);
await queryRunner.query(`ALTER TABLE \`employeePosMaster\` DROP COLUMN \`isOfficer\``);
await queryRunner.query(`ALTER TABLE \`employeePosMaster\` DROP COLUMN \`isDirector\``);
}
}