migrate
This commit is contained in:
parent
c8fcfebe97
commit
438e164fcb
2 changed files with 21 additions and 1 deletions
|
|
@ -242,7 +242,7 @@ export class ProfileSalary extends EntityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileSalary {
|
export class CreateProfileSalary {
|
||||||
profileId: string;
|
profileId: string | null;
|
||||||
commandDateAffect?: Date | null;
|
commandDateAffect?: Date | null;
|
||||||
commandDateSign?: Date | null;
|
commandDateSign?: Date | null;
|
||||||
amount?: Double | null;
|
amount?: Double | null;
|
||||||
|
|
|
||||||
20
src/migration/1740392430192-updateProfileSalary.ts
Normal file
20
src/migration/1740392430192-updateProfileSalary.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateProfileSalary1740392430192 implements MigrationInterface {
|
||||||
|
name = 'UpdateProfileSalary1740392430192'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` DROP COLUMN \`commandNo\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` ADD \`commandNo\` varchar(255) NULL COMMENT 'เลขที่คำสั่ง'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`commandNo\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`commandNo\` varchar(255) NULL COMMENT 'เลขที่คำสั่ง'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`commandNo\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`commandNo\` int NULL COMMENT 'เลขที่คำสั่ง'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` DROP COLUMN \`commandNo\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` ADD \`commandNo\` int NULL COMMENT 'เลขที่คำสั่ง'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue