รายชื่อตามกลุ่มในโครงสร้าง

This commit is contained in:
kittapath 2024-10-17 22:11:54 +07:00
parent 8786468761
commit 289b447b33
8 changed files with 269 additions and 42 deletions

View file

@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateProfilesalaryCommandId1729169375946 implements MigrationInterface {
name = 'UpdateProfilesalaryCommandId1729169375946'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`commandId\` varchar(40) NULL COMMENT 'คีย์นอก(FK)ของตาราง command'`);
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD CONSTRAINT \`FK_5aa33e13619d0c878032e2dc1bd\` FOREIGN KEY (\`commandId\`) REFERENCES \`command\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP FOREIGN KEY \`FK_5aa33e13619d0c878032e2dc1bd\``);
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`commandId\``);
}
}

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateProfilesalaryCommandId11729172500950 implements MigrationInterface {
name = 'UpdateProfilesalaryCommandId11729172500950'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`posMaster\` ADD \`statusReport\` varchar(20) NOT NULL COMMENT 'สถานะออกคำสั่ง' DEFAULT 'PENDING'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`posMaster\` DROP COLUMN \`statusReport\``);
}
}