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

[9.x] Move to anonymous migrations #37598

Merged
merged 2 commits into from
Jun 4, 2021
Merged

Conversation

driesvints
Copy link
Member

This PR removes class names for migration stubs since now with anonymous migrations these aren't needed anymore.

#37352 also already removed them from existing stubs for the MigrationCreator so I also made changes to remove the resolving of the class name when populating the stub in that class.

@driesvints driesvints marked this pull request as draft June 4, 2021 16:22
@browner12
Copy link
Contributor

time to drop "down" methods too? 😏

@driesvints
Copy link
Member Author

@browner12 I wish 😄

@driesvints driesvints marked this pull request as ready for review June 4, 2021 16:31
@taylorotwell taylorotwell merged commit 95b1899 into master Jun 4, 2021
@taylorotwell taylorotwell deleted the anonymous-migrations branch June 4, 2021 18:28
@crynobone
Copy link
Member

crynobone commented Jun 5, 2021

What happen if I do:

php artisan queue:failed-table

# wait few seconds

php artisan queue:failed-table

Previously we'll get duplicated class CreateFailedJobsTable exception.

@driesvints
Copy link
Member Author

@crynobone That's indeed a side effect of anonymous migrations. We could check for the filename part after the timestamp but then it could collide with other similar named migrations. I don't think there's any way around this.

But this should really be caught early on in development as the duplicate migration will throw an explicit failure when it's run.

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.

None yet

4 participants