17 lines
819 B
TypeScript
17 lines
819 B
TypeScript
|
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||
|
|
|
||
|
|
export class UpdateField1720165194013 implements MigrationInterface {
|
||
|
|
name = 'UpdateField1720165194013'
|
||
|
|
|
||
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.query(`ALTER TABLE \`portfolio\` DROP COLUMN \`detail\``);
|
||
|
|
await queryRunner.query(`ALTER TABLE \`portfolio\` ADD \`detail\` longtext NULL COMMENT 'รายละเอียดเอกสาร/ผลงาน'`);
|
||
|
|
}
|
||
|
|
|
||
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.query(`ALTER TABLE \`portfolio\` DROP COLUMN \`detail\``);
|
||
|
|
await queryRunner.query(`ALTER TABLE \`portfolio\` ADD \`detail\` varchar(255) NULL COMMENT 'รายละเอียดเอกสาร/ผลงาน'`);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|