exec($sql); echo "Success.\n"; } catch (PDOException $e) { echo "Error running migration: " . $e->getMessage() . "\n"; // Exit on first error return; } } } run_migrations();