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

Cut too long foreign key names #4026

Closed
sc-ms opened this issue Jan 30, 2021 · 0 comments
Closed

Cut too long foreign key names #4026

sc-ms opened this issue Jan 30, 2021 · 0 comments
Assignees
Labels
type:feature_request feature request

Comments

@sc-ms
Copy link

sc-ms commented Jan 30, 2021

Describe the feature

If you are using long struct/table-names, the generated foreign key name has more than 64 characters.
Feature is that it cuts automatically alle Foreign key names longer 64 characters.
Maybe it cuts off after 58 characters and appends a 5-character random string.

Motivation

No problems with auto migrate and foreign key constrains.

Related Issues

@github-actions github-actions bot added the type:feature_request feature request label Jan 30, 2021
@jinzhu jinzhu closed this as completed in db0cc4d Feb 1, 2021
mittwillson pushed a commit to itering/gorm that referenced this issue Sep 27, 2021
cgxxv pushed a commit to cgxxv/gorm that referenced this issue Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature_request feature request
Projects
None yet
Development

No branches or pull requests

2 participants