hrms-api-org/src/migration/1712639179589-update_table_posmaster_add_reason.ts
2024-04-09 12:18:52 +07:00

16 lines
779 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTablePosmasterAddReason1712639179589 implements MigrationInterface {
name = 'UpdateTablePosmasterAddReason1712639179589'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`employeePosMaster\` ADD \`reason\` text NULL COMMENT 'หมายเหตุ'`);
await queryRunner.query(`ALTER TABLE \`posMaster\` ADD \`reason\` text NULL COMMENT 'หมายเหตุ'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`posMaster\` DROP COLUMN \`reason\``);
await queryRunner.query(`ALTER TABLE \`employeePosMaster\` DROP COLUMN \`reason\``);
}
}