cakephp / phinx

PHP Database Migrations for Everyone
https://phinx.org
MIT License
4.45k stars 895 forks source link

Move postFlighCheck to be called before commit transaction #2272

Closed ajibarra closed 4 months ago

ajibarra commented 4 months ago

postFlightCheck method throws an exception if there is any pending action. But calling it after commit transaction does not make sense because even when you get the exception the damage is already done since the actual action was not executed.

Moving it before commit transaction ensures that if you get an exception you will be able to run it again