-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Why are numbers stripped from foreign key names #1681
Labels
type:question
general questions
Comments
I was able to trace this change to this commit : jinzhu@3a93676#diff-94e8518e61bc1742edb2ac53c97b5daaR611 The commit message states : Port changes made in PR #652 However in #652 there seemingly is no mention or code change related to |
4 tasks
jinzhu
pushed a commit
that referenced
this issue
Jan 31, 2018
jinzhu
pushed a commit
that referenced
this issue
Jan 31, 2018
iahmedov
pushed a commit
to housinganywhere/gorm
that referenced
this issue
Sep 3, 2018
blefevre
pushed a commit
to blefevre/gorm
that referenced
this issue
Feb 17, 2020
blefevre
pushed a commit
to blefevre/gorm
that referenced
this issue
Feb 17, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/jinzhu/gorm/blob/0a51f6cdc55d1650d9ed3b4c13026cfa9133b01e/dialect_mysql.go#L170
What is the reasoning behind stripping numbers from tables names to generate the foreign key name?
This makes it impossible to create foreign keys for a tables like these :
Wordpress MultiSite for example uses this pattern.
The text was updated successfully, but these errors were encountered: