import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';

export class AlterCityTable1713532237664 implements MigrationInterface {
  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.addColumn(
      'cities',
      new TableColumn({
        name: 'state',
        type: 'varchar',
        isNullable: true,
      }),
    );

    await queryRunner.addColumn(
      'cities',
      new TableColumn({
        name: 'home_town',
        type: 'varchar',
        isNullable: true,
      }),
    );
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.dropColumn('cities', 'state');
    await queryRunner.dropColumn('cities', 'home_town');
  }
}
