แก้ฟิว
This commit is contained in:
parent
2dce85a207
commit
1deee019b2
3 changed files with 102 additions and 20 deletions
|
|
@ -0,0 +1,24 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateDevelopmentAddIsReasonActual701727753251629 implements MigrationInterface {
|
||||
name = 'UpdateDevelopmentAddIsReasonActual701727753251629'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`development\` ADD \`isReasonPlanned70\` tinyint NOT NULL COMMENT 'รายละเอียดอื่นๆ 70 แผน' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`development\` ADD \`isReasonPlanned20\` tinyint NOT NULL COMMENT 'รายละเอียดอื่นๆ 20 แผน' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`development\` ADD \`isReasonPlanned10\` varchar(255) NULL COMMENT 'รายละเอียดอื่นๆ 10 แผน'`);
|
||||
await queryRunner.query(`ALTER TABLE \`development\` ADD \`isReasonActual70\` tinyint NOT NULL COMMENT 'รายละเอียดอื่นๆ 70 จริง' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`development\` ADD \`isReasonActual20\` tinyint NOT NULL COMMENT 'รายละเอียดอื่นๆ 20 จริง' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`development\` ADD \`isReasonActual10\` varchar(255) NULL COMMENT 'รายละเอียดอื่นๆ 10 จริง'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`isReasonActual10\``);
|
||||
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`isReasonActual20\``);
|
||||
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`isReasonActual70\``);
|
||||
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`isReasonPlanned10\``);
|
||||
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`isReasonPlanned20\``);
|
||||
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`isReasonPlanned70\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue