import { Migration } from '@mikro-orm/migrations';

export class Migration20250502161232 extends Migration {

  override async up(): Promise<void> {
    // Add API-related columns to app table
    this.addSql('alter table "app" add column "method" varchar(255) null;');
    this.addSql('alter table "app" add column "path" varchar(255) null;');
    this.addSql('alter table "app" add column "description" varchar(255) null;');
    this.addSql('alter table "app" add column "public_path" varchar(255) null;');
  }

  override async down(): Promise<void> {
    // Remove the added columns
    this.addSql('alter table "app" drop column "method";');
    this.addSql('alter table "app" drop column "path";');
    this.addSql('alter table "app" drop column "description";');
    this.addSql('alter table "app" drop column "public_path";');
  }

}
