เพิ่มจำนวนรุ่นตามแผน

This commit is contained in:
Kittapath 2024-04-17 14:26:37 +07:00
parent d7b095b91f
commit c87c3f8fef
3 changed files with 72 additions and 14 deletions

View file

@ -0,0 +1,18 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableDevAddGovernmentEndDate21713338710965 implements MigrationInterface {
name = 'UpdateTableDevAddGovernmentEndDate21713338710965'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`projectModal\``);
await queryRunner.query(`ALTER TABLE \`development\` ADD \`projectModalPlanned\` int NULL COMMENT 'จำนวน(รุ่น)ตามแผน'`);
await queryRunner.query(`ALTER TABLE \`development\` ADD \`projectModalActual\` int NULL COMMENT 'จำนวน(รุ่น)ตามจริง'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`projectModalActual\``);
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`projectModalPlanned\``);
await queryRunner.query(`ALTER TABLE \`development\` ADD \`projectModal\` int NULL COMMENT 'จำนวน(รุ่น)'`);
}
}