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
Creating multiple references in databases for same foreign key #17255
Comments
Note for when someone starts working on this task: there are some information about this in #17256 |
|
Other thing that I have noticed that If we remove reference from a field (and it is still in the model mean we don't remove the field but just the references) it reference in database will not be removed as we are only removing constraint from the field which have some references in the code. |
To explain what I meant in my previous comment: removing constraints is a destructive operation, and the base |
Issue Creation Checklist
Add upper case table name in code and dialect server is using lower_case_table_names the issue will be generated.
Bug Description
If I use database name in uppercase and my server is configured with lower_case_table_names then when I specify any relation in my code and the sync option with alter true is on it will create multiple references in table.
Reproducible Example
These all references are created for same reference
What do you expect to happen?
There should be only one reference for each reference
What is actually happening?
There is always creating a new reference each time code restart and sync with alter true is on,
Environment
Would you be willing to resolve this issue by submitting a Pull Request?
Indicate your interest in the resolution of this issue by adding the 👍 reaction. Comments such as "+1" will be removed.
The text was updated successfully, but these errors were encountered: