no message
This commit is contained in:
parent
f3d2de51f7
commit
428ac7b2b4
4 changed files with 66 additions and 9 deletions
|
|
@ -0,0 +1,22 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableDevAddGovernmentEndDate1713332483208 implements MigrationInterface {
|
||||
name = 'UpdateTableDevAddGovernmentEndDate1713332483208'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` ADD \`bookNumber\` varchar(255) NULL COMMENT 'เลขที่หนังสือรายงานตัวกลับเข้าปฏิบัติราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` ADD \`bookDate\` datetime NULL COMMENT ' หนังสือรายงานตัวกลับเข้าปฏิบัติราชการลงวันที่'`);
|
||||
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` ADD \`governmentEndDate\` datetime NULL COMMENT 'วันสิ้นสุดภาระผูกพัน'`);
|
||||
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` CHANGE \`governmentDate\` \`governmentDate\` datetime NULL COMMENT 'วันที่กลับเข้าปฏิบัติราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild5\` CHANGE \`strategyChild5Name\` \`strategyChild5Name\` varchar(255) NULL COMMENT 'กลยุทธ์ที่/เป้าประสงค์ที่'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`strategyChild5\` CHANGE \`strategyChild5Name\` \`strategyChild5Name\` varchar(255) NULL COMMENT 'กลยุทธ์ที่'`);
|
||||
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` CHANGE \`governmentDate\` \`governmentDate\` datetime NULL COMMENT 'กลับเข้ารับราชการตั้งแต่'`);
|
||||
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` DROP COLUMN \`governmentEndDate\``);
|
||||
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` DROP COLUMN \`bookDate\``);
|
||||
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` DROP COLUMN \`bookNumber\``);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableDevAddGovernmentEndDate11713334672151 implements MigrationInterface {
|
||||
name = 'UpdateTableDevAddGovernmentEndDate11713334672151'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` DROP COLUMN \`isNoGraduated\``);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` ADD \`isNoGraduated\` tinyint NOT NULL COMMENT 'เสร็จสิ้นการศึกษาตามที่หลักสูตรกำหนดแล้วแต่ยังไม่สำเร็จการศึกษา' DEFAULT '0'`);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue