hrms-api-org/src/migration/1767930614165-update_table_posMasterHistory.ts

18 lines
1.3 KiB
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTablePosMasterHistory1767930614165 implements MigrationInterface {
name = 'UpdateTablePosMasterHistory1767930614165'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`posMasterHistory\` ADD \`profileId\` varchar(40) NULL COMMENT 'คีย์นอก(FK)ของตาราง profile'`);
await queryRunner.query(`ALTER TABLE \`posMasterHistory\` ADD \`rootDnaId\` varchar(40) NULL COMMENT 'dna ของตาราง orgRoot'`);
await queryRunner.query(`ALTER TABLE \`posMasterHistory\` ADD \`child1DnaId\` varchar(40) NULL COMMENT 'dna ของตาราง orgChild1'`);
await queryRunner.query(`ALTER TABLE \`posMasterHistory\` ADD \`child2DnaId\` varchar(40) NULL COMMENT 'dna ของตาราง orgChild2'`);
await queryRunner.query(`ALTER TABLE \`posMasterHistory\` ADD \`child3DnaId\` varchar(40) NULL COMMENT 'dna ของตาราง orgChild3'`);
await queryRunner.query(`ALTER TABLE \`posMasterHistory\` ADD \`child4DnaId\` varchar(40) NULL COMMENT 'dna ของตาราง orgChild4'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
}
}