exec($sql); echo "Migration successful: " . basename($file) . "\n"; } catch (PDOException $e) { echo "Migration failed for " . basename($file) . ": " . $e->getMessage() . "\n"; } } } run_migrations();