unit to string
This commit is contained in:
parent
9a85609e93
commit
6e07eaacba
8 changed files with 33 additions and 13 deletions
|
|
@ -0,0 +1,20 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableKpiSpecialUnitToString1715244414852 implements MigrationInterface {
|
||||
name = 'UpdateTableKpiSpecialUnitToString1715244414852'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserPlanned\` DROP COLUMN \`unit\``);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserPlanned\` ADD \`unit\` varchar(255) NULL COMMENT 'หน่วยนับ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserRole\` DROP COLUMN \`unit\``);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserRole\` ADD \`unit\` varchar(255) NULL COMMENT 'หน่วยนับ'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserRole\` DROP COLUMN \`unit\``);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserRole\` ADD \`unit\` int NULL COMMENT 'หน่วยนับ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserPlanned\` DROP COLUMN \`unit\``);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserPlanned\` ADD \`unit\` int NULL COMMENT 'หน่วยนับ'`);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue