import { MigrationInterface, QueryRunner } from 'typeorm';

export class RemoveSupportsVisionColumn1739260000000 implements MigrationInterface {
  name = 'RemoveSupportsVisionColumn1739260000000';

  public async up(queryRunner: QueryRunner): Promise<void> {
    // Remove supportsVision column from model_configs table
    // This column is no longer needed as we now use ModelType.VISION instead
    await queryRunner.query(`
      ALTER TABLE "model_configs" DROP COLUMN "supportsVision"
    `);
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    // Restore supportsVision column in case of rollback
    await queryRunner.query(`
      ALTER TABLE "model_configs" ADD COLUMN "supportsVision" boolean NOT NULL DEFAULT 0
    `);
  }
}
