no message
This commit is contained in:
parent
102f1f6646
commit
44b8b516eb
6 changed files with 241 additions and 21 deletions
20
src/migration/1732252198299-updata_profile_add_prefixmain.ts
Normal file
20
src/migration/1732252198299-updata_profile_add_prefixmain.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdataProfileAddPrefixmain1732252198299 implements MigrationInterface {
|
||||
name = 'UpdataProfileAddPrefixmain1732252198299'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`prefixMain\` varchar(40) NULL COMMENT 'คำนำหน้าชื่อตัวหลัก'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`prefixMain\` varchar(40) NULL COMMENT 'คำนำหน้าชื่อตัวหลัก'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`prefixMain\` varchar(40) NULL COMMENT 'คำนำหน้าชื่อตัวหลัก'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`prefixMain\` varchar(40) NULL COMMENT 'คำนำหน้าชื่อตัวหลัก'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`prefixMain\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`prefixMain\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`prefixMain\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`prefixMain\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue