แก้ ไข คำ สั่ง tab0
This commit is contained in:
parent
22ae951626
commit
5ccbdd1f61
3 changed files with 173 additions and 0 deletions
18
src/migration/1727151717676-update_command_add_isSign.ts
Normal file
18
src/migration/1727151717676-update_command_add_isSign.ts
Normal 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\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue