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] Fix schema:dump command - Use old .dump file name if it exists #46969

Conversation

florianoversmake
Copy link

Version 9.50 introduced a new schema dump-file name with the following PR:
#45805. ( src/Illuminate/Database/Console/DumpCommand.php ).

This behavior creates an additional mysql-schema.sql file alongside the existing mysql-schema.dump file, which may cause failures in existing project toolchains (this happened to us).

The migrate command already checks for the existence of a mysql-schema.dump file and will use it instead of the .sql file if it is present. Relevant Code

This Pull Request implements the same logic for the schema:dump command.

This improvement will assist developers with existing mysql-schema.dump files by eliminating the need to modify their current toolchains.

@taylorotwell
Copy link
Member

I don't understand why we would want this in the dump command? We want it to start using the new format.

@florianoversmake
Copy link
Author

I don't understand why we would want this in the dump command? We want it to start using the new format.

Objective accomplished. We have adjusted our workflows accordingly.

We prefer using the .sql extension as well; however, this change may cause disruptions in existing CI/CD pipelines (such as those involving diffing or linting the database dump).

It might take some time for users to determine the cause of any issues, as this update is only a minor version change and CI/CD logs are hard to debug some times.

@taylorotwell
Copy link
Member

Going to hold off on this for now.

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