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

export class AddOptionsToCsvBookings1749000000000 implements MigrationInterface {
  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.addColumn(
      'csv_bookings',
      new TableColumn({
        name: 'options',
        type: 'jsonb',
        isNullable: false,
        default: "'{}'",
      })
    );
  }

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