migrate
This commit is contained in:
parent
80dfb1d3ce
commit
bbf80788e0
4 changed files with 56 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableKpiUserEvaluationAddIsReqEdit1715161033009 implements MigrationInterface {
|
||||
name = 'UpdateTableKpiUserEvaluationAddIsReqEdit1715161033009'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` ADD \`isReqEdit\` tinyint NOT NULL COMMENT 'คำขอแก้ไข' DEFAULT 0`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` DROP COLUMN \`isReqEdit\``);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableKpiUserEvaluationAddIsReqEdit11715161401755 implements MigrationInterface {
|
||||
name = 'UpdateTableKpiUserEvaluationAddIsReqEdit11715161401755'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserDevelopment\` ADD \`isDevelopment70\` tinyint NOT NULL COMMENT 'วิธีพัฒนา70' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserDevelopment\` ADD \`isDevelopment20\` tinyint NOT NULL COMMENT 'วิธีพัฒนา20' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserDevelopment\` ADD \`isDevelopment10\` tinyint NOT NULL COMMENT 'วิธีพัฒนา10' DEFAULT 0`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserDevelopment\` DROP COLUMN \`isDevelopment10\``);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserDevelopment\` DROP COLUMN \`isDevelopment20\``);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserDevelopment\` DROP COLUMN \`isDevelopment70\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue