diff --git a/src/entities/OrgRevision.ts b/src/entities/OrgRevision.ts index 48175f0f..47864ab8 100644 --- a/src/entities/OrgRevision.ts +++ b/src/entities/OrgRevision.ts @@ -18,8 +18,9 @@ export class OrgRevision extends EntityBase { orgRevisionName: string; @Column({ + nullable: true, comment: "หมายเหตุ", - length: 255, + type: "text", default: null, }) remark: string; diff --git a/src/migration/1732165078861-updata_org_add_remark1.ts b/src/migration/1732165078861-updata_org_add_remark1.ts new file mode 100644 index 00000000..a00b5504 --- /dev/null +++ b/src/migration/1732165078861-updata_org_add_remark1.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdataOrgAddRemark11732165078861 implements MigrationInterface { + name = 'UpdataOrgAddRemark11732165078861' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`orgRevision\` DROP COLUMN \`remark\``); + await queryRunner.query(`ALTER TABLE \`orgRevision\` ADD \`remark\` text NULL COMMENT 'หมายเหตุ'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`orgRevision\` DROP COLUMN \`remark\``); + await queryRunner.query(`ALTER TABLE \`orgRevision\` ADD \`remark\` varchar(255) NULL COMMENT 'หมายเหตุ'`); + } + +}