16 lines
859 B
TypeScript
16 lines
859 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class UpdateTableProfileemployeeAddGroup1711033351014 implements MigrationInterface {
|
|
name = 'UpdateTableProfileemployeeAddGroup1711033351014'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`group\` int NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
|
|
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`group\` int NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`group\``);
|
|
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`group\``);
|
|
}
|
|
|
|
}
|