migrate
This commit is contained in:
parent
e5b1c3b8d5
commit
a5fa754079
1 changed files with 16 additions and 0 deletions
16
src/migration/1729228451049-update_profile_add_conemail.ts
Normal file
16
src/migration/1729228451049-update_profile_add_conemail.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateProfileAddConemail1729228451049 implements MigrationInterface {
|
||||
name = 'UpdateProfileAddConemail1729228451049'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`statusEmail\` varchar(255) NULL COMMENT 'สถานะอีเมล'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`statusEmail\` varchar(255) NULL COMMENT 'สถานะอีเมล'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`statusEmail\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`statusEmail\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue