You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to know if migration aborted due to some exception.
Q
A
New Feature
yes
RFC
yes/no
BC Break
no
Summary
There is a need to dispatch an event \Doctrine\Migrations\Events::onMigrationsAborted when exception happens during execution of migrations \Doctrine\Migrations\DbalMigrator::executeMigrations
The text was updated successfully, but these errors were encountered:
I use ELK stack for logging and I want to know how frequently migrations were failed during deployment process and on which migration. So I need this type of event to create a listener.
A usecase that I have and am trying to solve with this:
onMigrationsMigrating -> aquire a lock, if it's locked throw an error that migrations are already running
onMigrationsMigrated -> release the lock
This ensures only one instance of the migrations are running at the same time, except when an error occurs, then no migrations are run and you can't run them again till the lock is released.
Having a onMigrationsError event would help to catch that and also release the lock.
Feature Request
It would be useful to know if migration aborted due to some exception.
Summary
There is a need to dispatch an event
\Doctrine\Migrations\Events::onMigrationsAborted
when exception happens during execution of migrations\Doctrine\Migrations\DbalMigrator::executeMigrations
The text was updated successfully, but these errors were encountered: