exec($statement); } } echo "Executed: " . basename($file) . "\n"; } echo "All migrations completed successfully!\n"; } catch (Exception $e) { echo "Migration failed: " . $e->getMessage() . "\n"; }