hrms-api-org/src/migration/1729159077554-update_profilesalary_dateGovernment.ts
2024-10-17 19:26:33 +07:00

16 lines
831 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateProfilesalaryDateGovernment1729159077554 implements MigrationInterface {
name = 'UpdateProfilesalaryDateGovernment1729159077554'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`dateGovernment\` datetime NULL COMMENT 'วันที่'`);
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`isGovernment\` tinyint NULL COMMENT 'เข้ารับราชการ'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`isGovernment\``);
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`dateGovernment\``);
}
}