16 lines
877 B
TypeScript
16 lines
877 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class UpdateTableDevhisAddOrg1713347839774 implements MigrationInterface {
|
|
name = 'UpdateTableDevhisAddOrg1713347839774'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE \`developmentHistory\` ADD \`org\` varchar(255) NULL COMMENT 'ชื่อหน่วยงานที่สังกัด'`);
|
|
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` ADD \`org\` varchar(255) NULL COMMENT 'ชื่อหน่วยงานที่สังกัด'`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE \`developmentScholarship\` DROP COLUMN \`org\``);
|
|
await queryRunner.query(`ALTER TABLE \`developmentHistory\` DROP COLUMN \`org\``);
|
|
}
|
|
|
|
}
|