migrate
This commit is contained in:
parent
80dfb1d3ce
commit
bbf80788e0
4 changed files with 56 additions and 0 deletions
|
|
@ -47,6 +47,24 @@ export class KpiUserDevelopment extends EntityBase {
|
|||
})
|
||||
achievement0: string;
|
||||
|
||||
@Column({
|
||||
comment: "วิธีพัฒนา70",
|
||||
default: false,
|
||||
})
|
||||
isDevelopment70: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "วิธีพัฒนา20",
|
||||
default: false,
|
||||
})
|
||||
isDevelopment20: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "วิธีพัฒนา10",
|
||||
default: false,
|
||||
})
|
||||
isDevelopment10: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
|
|||
|
|
@ -85,6 +85,12 @@ export class KpiUserEvaluation extends EntityBase {
|
|||
})
|
||||
evaluationResults: string;
|
||||
|
||||
@Column({
|
||||
comment: "คำขอแก้ไข",
|
||||
default: false,
|
||||
})
|
||||
isReqEdit: boolean;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
nullable: true,
|
||||
|
|
|
|||
|
|
@ -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