add idcard
This commit is contained in:
parent
9f66786502
commit
76d9be4da1
4 changed files with 71 additions and 30 deletions
|
|
@ -1,15 +0,0 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateAssigntb1725594553970 implements MigrationInterface {
|
||||
name = "UpdateAssigntb1725594553970";
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE \`assign\` ADD \`other_desc\` varchar(255) NULL COMMENT 'กฎหมายอื่นๆ'`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`assign\` DROP COLUMN \`other_desc\``);
|
||||
}
|
||||
}
|
||||
15
src/migration/1728384119754-add-idcard.ts
Normal file
15
src/migration/1728384119754-add-idcard.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddIdcard1728384119754 implements MigrationInterface {
|
||||
name = "AddIdcard1728384119754";
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE \`personal\` ADD \`idcard\` varchar(255) NULL COMMENT 'เลขบัตรประจำตัวประชาชน'`
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`personal\` DROP COLUMN \`idcard\``);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue