diff --git a/src/Phinx/Migration/Manager.php b/src/Phinx/Migration/Manager.php index 6c5ae7257..046c93302 100644 --- a/src/Phinx/Migration/Manager.php +++ b/src/Phinx/Migration/Manager.php @@ -254,6 +254,9 @@ public function migrate($environment, $version = null) } finally { if ($env->getAdapter() !== null) { $env->getAdapter()->disconnect(); + } else { + echo "couldn't disconnect. Exiting to avoid eating up connections."; + exit(); } } }