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

fix: auto migration column order unpredictable #4980

Merged
merged 1 commit into from Jan 6, 2022

Conversation

halfcrazy
Copy link
Contributor

@halfcrazy halfcrazy commented Jan 5, 2022

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

Fix #4351 make migration column order predictable.

User Case Description

@halfcrazy halfcrazy force-pushed the fix-migrate-order branch 2 times, most recently from 3c0b0f4 to a4471b3 Compare January 5, 2022 10:26
@halfcrazy halfcrazy changed the title fix: auto migration column order unpredictable WIP:fix: auto migration column order unpredictable Jan 5, 2022
@halfcrazy halfcrazy changed the title WIP:fix: auto migration column order unpredictable fix: auto migration column order unpredictable Jan 6, 2022
tests/go.mod Outdated
@@ -16,3 +16,5 @@ require (
)

replace gorm.io/gorm => ../

replace gorm.io/driver/mysql => github.com/halfcrazy/mysql v1.2.3-0.20220106042630-805c93c0d8d9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove those debug code, thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ci get failed after switching origin MySQL driver. pls take a look at go-gorm/mysql#60

@jinzhu
Copy link
Member

jinzhu commented Jan 6, 2022

Hi @halfcrazy

Can you format the source code with gofmt according to the bytedog suggestion? thank you.

@halfcrazy
Copy link
Contributor Author

Hi @halfcrazy

Can you format the source code with gofmt according to the bytedog suggestion? thank you.

Done

@jinzhu jinzhu merged commit f757b8f into go-gorm:master Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deterministic execution of AutoMigrate
2 participants