-
Notifications
You must be signed in to change notification settings - Fork 17
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
gormschema: support customize JoinTable #40
Conversation
@ronenlu 👀 Could you have a look? Happy to discuss more |
@luantranminh Thank you for your contribution! I will review the PR soon |
Looking at the unit test at the moment, the CREATE CONSTRAINT is not in the desired order, and it's also different when I run the test on my machine. 🏃♂️ |
I found interesting stuff here. GORM stores table relationships inside a Map. Looping through a Map is not guaranteed to produce the same order all the time. https://github.com/go-gorm/gorm/blob/8c18714462de07fa3392b99eda089f2f9e3b6042/schema/schema.go#L186 We're looping through it here: atlas-provider-gorm/gormschema/gorm.go Line 147 in e5d6dbf
Resulting SQL statements output could be different each time the CI runs |
Fix #39