import { MigrationInterface, QueryRunner } from "typeorm"; export class UpdateTableSalaryProfileAddRevision21709090519266 implements MigrationInterface { name = 'UpdateTableSalaryProfileAddRevision21709090519266' public async up(queryRunner: QueryRunner): Promise { await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`status\` varchar(20) NOT NULL COMMENT 'สถานะ' DEFAULT 'PENDING'`); await queryRunner.query(`ALTER TABLE \`salaryOrg\` CHANGE \`snapshot\` \`snapshot\` varchar(20) NOT NULL COMMENT 'รอบการ Snapshot' DEFAULT 'SNAP1'`); } public async down(queryRunner: QueryRunner): Promise { await queryRunner.query(`ALTER TABLE \`salaryOrg\` CHANGE \`snapshot\` \`snapshot\` varchar(20) NOT NULL COMMENT 'รอบการ Snapshot' DEFAULT 'SHAP1'`); await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`status\``); } }