Migrate move isDeleted in profileSalary
This commit is contained in:
parent
65e3740cc2
commit
f03ccb78ac
4 changed files with 19 additions and 21 deletions
|
|
@ -287,13 +287,6 @@ export class ProfileSalary extends EntityBase {
|
|||
})
|
||||
positionArea: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
comment: "สถานะลบข้อมูล",
|
||||
default: false,
|
||||
})
|
||||
isDeleted: boolean;
|
||||
|
||||
@ManyToOne(() => Command, (command) => command.profileSalarys)
|
||||
@JoinColumn({ name: "commandId" })
|
||||
command: Command;
|
||||
|
|
|
|||
|
|
@ -292,11 +292,4 @@ export class ProfileSalaryBackup extends EntityBase {
|
|||
})
|
||||
positionArea: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
comment: "สถานะลบข้อมูล",
|
||||
default: false,
|
||||
})
|
||||
isDeleted: boolean;
|
||||
|
||||
}
|
||||
|
|
@ -228,13 +228,6 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
})
|
||||
posNumCodeSitAbb: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
comment: "สถานะลบข้อมูล",
|
||||
default: false,
|
||||
})
|
||||
isDeleted: boolean;
|
||||
|
||||
@ManyToOne(() => Command, (command) => command.profileSalaryHistorys)
|
||||
@JoinColumn({ name: "commandId" })
|
||||
command: Command;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class MoveFieldsIsDeletedInTablesProfileSalary1770872734016 implements MigrationInterface {
|
||||
name = 'MoveFieldsIsDeletedInTablesProfileSalary1770872734016'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` DROP COLUMN \`isDeleted\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`isDeleted\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalaryBackup\` DROP COLUMN \`isDeleted\``);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalaryBackup\` ADD \`isDeleted\` tinyint NOT NULL COMMENT 'สถานะลบข้อมูล' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`isDeleted\` tinyint NOT NULL COMMENT 'สถานะลบข้อมูล' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileSalaryHistory\` ADD \`isDeleted\` tinyint NOT NULL COMMENT 'สถานะลบข้อมูล' DEFAULT '0'`);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue