Closed luantranminh closed 6 months ago
@ronenlu 👀 Could you have a look? Happy to discuss more
@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: https://github.com/ariga/atlas-provider-gorm/blob/e5d6dbfb61aaf99a784b5f8641a8bcace527f1e7/gormschema/gorm.go#L147
Resulting SQL statements output could be different each time the CI runs It hurts our tests, but the migration files are fine. I'll submit another commit to sort the Relations out before looping.
Ronen said the forked project is missing Secrets to run the integration tests
Ronen said the forked project is missing Secrets to run the integration tests
Yes, because the repo's secret doesn't share with the forked repository.
Fix #39