16 lines
1 KiB
TypeScript
16 lines
1 KiB
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class UpdateProfileAssessmentAddperiod1738644026886 implements MigrationInterface {
|
|
name = 'UpdateProfileAssessmentAddperiod1738644026886'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`CREATE TABLE \`IMPORT_ORG\` (\`id\` int NOT NULL AUTO_INCREMENT, \`DEPARTMENT_CODE\` text NULL, \`DIVISION_CODE\` text NULL, \`SECTION_CODE\` text NULL, \`JOB_CODE\` text NULL, \`orgRoot\` text NULL, \`orgChild1\` text NULL, \`orgChild2\` text NULL, \`orgChild3\` text NULL, \`MISCODE\` text NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
await queryRunner.query(`ALTER TABLE \`profileAssessment\` ADD \`period\` varchar(255) NULL COMMENT 'รอบการประเมิน'`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE \`profileAssessment\` DROP COLUMN \`period\``);
|
|
await queryRunner.query(`DROP TABLE \`IMPORT_ORG\``);
|
|
}
|
|
|
|
}
|