hrms-api-kpi/src/migration/1713439776331-update_table_kpiperiod_add_year.ts
2024-04-19 09:44:46 +07:00

14 lines
553 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableKpiperiodAddYear1713439776331 implements MigrationInterface {
name = 'UpdateTableKpiperiodAddYear1713439776331'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`kpiPeriod\` ADD \`year\` int NULL COMMENT 'ปีงบประมาณ'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`kpiPeriod\` DROP COLUMN \`year\``);
}
}