บันทึกหน่วยงาน

This commit is contained in:
Kittapath 2024-04-12 14:22:44 +07:00
parent 371f09c26f
commit 650c6fe3e3
4 changed files with 115 additions and 5 deletions

View file

@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableDevelopmentAddRoot1712904313381 implements MigrationInterface {
name = 'UpdateTableDevelopmentAddRoot1712904313381'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`development\` ADD \`rootId\` varchar(255) NULL COMMENT 'id หน่วยงาน'`);
await queryRunner.query(`ALTER TABLE \`development\` ADD \`root\` varchar(255) NULL COMMENT 'ชื่อหน่วยงาน'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`root\``);
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`rootId\``);
}
}

View file

@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableDevelopmentAddRootshortname1712904744359 implements MigrationInterface {
name = 'UpdateTableDevelopmentAddRootshortname1712904744359'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`development\` ADD \`orgRootShortName\` varchar(255) NULL COMMENT 'ชื่อย่ิหน่วยงาน'`);
await queryRunner.query(`ALTER TABLE \`development\` ADD \`orgRevisionId\` varchar(255) NULL COMMENT 'id revision'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`orgRevisionId\``);
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`orgRootShortName\``);
}
}