Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fire events on migrations #854
Can we have events fired in Migrations?
This would allow for things like clearing of the cache when the migrations are being fired.
A use case i've come across is some of our migrations have data populated for User groups and their roles (using spatie laravel permissions).
When trying to run a
Even though the data is all deleted, it throws exceptions on create attempts because the cache still exists.
I'd like to be able to catch the "after truncate" bit, and clear the cache so that populate works.
There are also use cases for this in production too, such as sending a notification to a monitoring service whenever a migration has been ran, to help track performance metrics before / after migrations etc.