exec($sql); } echo "Migrations completed successfully.\n"; } catch (PDOException $e) { http_response_code(500); die("Migration failed: " . $e->getMessage() . "\n"); } catch (Exception $e) { http_response_code(500); die("An error occurred: " . $e->getMessage() . "\n"); }