Merge branch 'develop' into adiDev
This commit is contained in:
commit
7d99487523
2 changed files with 20 additions and 0 deletions
|
|
@ -30,6 +30,12 @@ export class SalaryPeriod extends EntityBase {
|
|||
})
|
||||
status?: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ปีงบหระมาณ",
|
||||
})
|
||||
year: number;
|
||||
|
||||
@OneToMany(() => SalaryOrg, (salaryOrg) => salaryOrg.salaryPeriod)
|
||||
salaryOrgs: SalaryOrg[];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue