-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
SQLite: Fix wrongly detected reference constraint name on schema change #4246
Conversation
I'd expect #4243 (comment) to be summarized in the commit message body, right now it's quite hard to understand what is going on here from the commit message alone. |
Thank you for the PR, @MyIgel. Please make sure there's a functional test that reproduces the problem. The changes in the existing test are clear enough but insufficient. |
If there is no constraint name defined the listTableForeignKeys should not invent a new one as a numerical id has no deeper meaning and makes schema changes adding information that was not there before. Using `null` is an apropriate value as its already in use when handling not existing fk names.
I added a more verbose explanation, i hope its more understandable now |
@MyIgel sorry, I didn't notice that the test being changed is a functional one. The change looks good to me given the explanation in #4243 (comment). |
It's a great commit message, you can be proud of it! |
Thanks @MyIgel ! |
Summary
This fixes #4243 as other parts of the code expect the constraint name to be
null
, for example\Doctrine\DBAL\Schema\ForeignKeyConstraint::__construct
if no actual name exists