Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Add a no migrations event #31289

Merged
merged 2 commits into from
Feb 3, 2020
Merged

[6.x] Add a no migrations event #31289

merged 2 commits into from
Feb 3, 2020

Conversation

wouterrutgers
Copy link
Contributor

@wouterrutgers wouterrutgers commented Jan 29, 2020

This PR is a (much more) simplified version of #29503

Reasoning:
Currently, there are no migration events fired when there are no migrations to run or to rollback. However, there might be use cases (as described in the above PR) where events are still desirable.

The other PR refactored the Migrator quite a bit. And was also breaking because currently no events are fired, and with the update, the events would always be fired. So if your code expects the events to be only fired when migrations are available it would break.

The suggested change is a new event NoMigrations that will only be fired when no migrations will be executed. This is a new feature and does not break any code.

@taylorotwell taylorotwell merged commit fc3a5a9 into laravel:6.x Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants