import { MigrationInterface, QueryRunner } from "typeorm";

export class AddBusinessLicenseFilesToCompanyProfiles1791000000003
  implements MigrationInterface
{
  name = "AddBusinessLicenseFilesToCompanyProfiles1791000000003";

  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(`
      ALTER TABLE freight.company_profiles
        ADD COLUMN IF NOT EXISTS business_license_files jsonb;
    `);
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(`
      ALTER TABLE freight.company_profiles
        DROP COLUMN IF EXISTS business_license_files;
    `);
  }
}
