ค้นหาทะเบียน

This commit is contained in:
Kittapath 2024-03-26 09:47:17 +07:00
parent e368c4cae8
commit 6e8b8d58b9
5 changed files with 1412 additions and 32 deletions

View file

@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileAddIsLeave1711357767283 implements MigrationInterface {
name = 'UpdateTableProfileAddIsLeave1711357767283'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`isLeave\` tinyint NOT NULL COMMENT 'เกษียณ' DEFAULT 0`);
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`isLeave\` tinyint NOT NULL COMMENT 'เกษียณ' DEFAULT 0`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`isLeave\``);
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`isLeave\``);
}
}