-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
validate schema command: allow to debug missing schema updates list #9019
validate schema command: allow to debug missing schema updates list #9019
Conversation
181af44
to
0e6acb8
Compare
Thank you for your pull request. I wonder, isn't the SQL that would be dumped here be the same as the |
Hello Derrabus, yes of course, but you have to run a second command (yes, I am lazy 😁). I liked the idea of displaying it directly. Moreover, for the mapping, the errors are displayed. |
I see. Nevertheless, we would need tests that cover your change. Also, since this is a new feature, the 2.10.x branch would be the appropriate target. |
Hello, I can redo the PR to be on the 2.10.x. branch. Can you give some hint about the tests that should be done? Thanks. |
0e6acb8
to
6d0f9a8
Compare
No need! I re-targeted and rebased! |
lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php
Outdated
Show resolved
Hide resolved
f677206
to
fcf746d
Compare
7e72c33
to
a9c7f58
Compare
75aa9d1
to
0117a4d
Compare
The tests fail with Postgresql, Mysql, MariaDB. Why? |
The schema is in synch for Postgresql, Mysql, MariaDB so there is no error message. I guess I must force schema to be invalid. |
0117a4d
to
2689a52
Compare
I skipped the test for the other platforms, as we only want to test the error output, it's not related to the db platform. Maybe it can be cleaner? let me know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The platform is not intervening at any point in the new code you introduced, so IMO it's good as is.
Hi @derrabus, do you think there is still work to do on this PR? 🙂 |
2689a52
to
c434c20
Compare
Looks good to me, I guess. Let's push it through the CI again. |
Thank you! |
Hi,
This PR allows seeing why you get the message "The database schema is not in sync with the current mapping file" by displaying all the missing SQL so the database schema can be up-to-date. This debug is only activated when at least the verbose mode of the console is activated.
See you. COil :)
Questions:
getUpdateSchemaList
?ValidateSchemaCommand
if I am right (except that is callable withorm:validate-schema
)