diff --git a/src/migration/1738657968680-updateroleadddna1.ts b/src/migration/1738657968680-updateroleadddna1.ts new file mode 100644 index 0000000..e1cef91 --- /dev/null +++ b/src/migration/1738657968680-updateroleadddna1.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class Updateroleadddna11738657968680 implements MigrationInterface { + name = 'Updateroleadddna11738657968680' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`salaryOrgEmployee\` ADD \`rootDnaId\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง orgRoot Dna'`); + await queryRunner.query(`ALTER TABLE \`salaryOrg\` ADD \`rootDnaId\` varchar(40) NOT NULL COMMENT 'คีย์นอก(FK)ของตาราง orgRoot Dna'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`salaryOrg\` DROP COLUMN \`rootDnaId\``); + await queryRunner.query(`ALTER TABLE \`salaryOrgEmployee\` DROP COLUMN \`rootDnaId\``); + } + +}