add columns Assign=> reportPersonId
This commit is contained in:
parent
ff3d42b451
commit
eb554bc0e3
3 changed files with 59 additions and 12 deletions
14
src/migration/1730347219061-addcolmns.ts
Normal file
14
src/migration/1730347219061-addcolmns.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class Addculmns1730347219061 implements MigrationInterface {
|
||||
name = 'Addculmns1730347219061'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`assign\` ADD \`reportPersonId\` varchar(255) NOT NULL COMMENT 'id คณะกรรมการที่จะประเมินผล'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`assign\` DROP COLUMN \`reportPersonId\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue