Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2024-02-27 10:10:40 +07:00
commit 7d99487523
2 changed files with 20 additions and 0 deletions

View file

@ -30,6 +30,12 @@ export class SalaryPeriod extends EntityBase {
})
status?: string;
@Column({
nullable: true,
comment: "ปีงบหระมาณ",
})
year: number;
@OneToMany(() => SalaryOrg, (salaryOrg) => salaryOrg.salaryPeriod)
salaryOrgs: SalaryOrg[];
}

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableSalaryPeriodAddYear1709003297171 implements MigrationInterface {
name = 'UpdateTableSalaryPeriodAddYear1709003297171'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salaryPeriod\` ADD \`year\` int NULL COMMENT 'ปีงบหระมาณ'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`salaryPeriod\` DROP COLUMN \`year\``);
}
}