<?php

require __DIR__ . '/vendor/autoload.php';

$app = require_once __DIR__ . '/bootstrap/app.php';
$kernel = $app->make('Illuminate\Contracts\Console\Kernel');
$kernel->bootstrap();

echo "Running migration to add down_payment column...\n\n";

$exitCode = $kernel->call('migrate', [
    '--path' => 'database/migrations/2026_02_06_075000_add_down_payment_to_immigopro_packages.php',
    '--force' => true,
]);

if ($exitCode === 0) {
    echo "\n✓ Migration completed successfully!\n";
} else {
    echo "\n✗ Migration failed with exit code: $exitCode\n";
}
