migrate db

This commit is contained in:
Kittapath 2024-03-28 10:29:16 +07:00
parent 4ff04f0dc5
commit 1899969901

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableSalaryprofileAddRoot1711596443220 implements MigrationInterface {
name = 'UpdateTableSalaryprofileAddRoot1711596443220'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salaryOrg\` ADD \`root\` varchar(255) NULL COMMENT 'orgRoot'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salaryOrg\` DROP COLUMN \`root\``);
}
}