แก้ ไข คำ สั่ง tab0

This commit is contained in:
kittapath 2024-09-24 11:30:07 +07:00
parent 22ae951626
commit 5ccbdd1f61
3 changed files with 173 additions and 0 deletions

View file

@ -0,0 +1,18 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateCommandAddIsSign1727151717676 implements MigrationInterface {
name = 'UpdateCommandAddIsSign1727151717676'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`command\` ADD \`isSignature\` tinyint NULL COMMENT 'ออกคำสั่งแบบ Digital Signature'`);
await queryRunner.query(`ALTER TABLE \`command\` ADD \`isDraft\` tinyint NOT NULL COMMENT 'ยืนยันทำแบบร่าง' DEFAULT 0`);
await queryRunner.query(`ALTER TABLE \`command\` ADD \`isSign\` tinyint NOT NULL COMMENT 'ผู้มีอำนาจลงนาม' DEFAULT 0`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`command\` DROP COLUMN \`isSign\``);
await queryRunner.query(`ALTER TABLE \`command\` DROP COLUMN \`isDraft\``);
await queryRunner.query(`ALTER TABLE \`command\` DROP COLUMN \`isSignature\``);
}
}