import { MigrationInterface, QueryRunner } from "typeorm";

export class UpdateTableProfileAddEmail1708058097765 implements MigrationInterface {
    name = 'UpdateTableProfileAddEmail1708058097765'

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE \`profile\` ADD \`email\` varchar(255) NULL COMMENT 'อีเมล'`);
        await queryRunner.query(`ALTER TABLE \`profile\` ADD \`phone\` varchar(20) NULL COMMENT 'เบอร์โทร'`);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`phone\``);
        await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`email\``);
    }

}
