-
-
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
Add field tag to ignore migration #4028
Conversation
Hello @yrong For you example, I would suggest you add a type ChainExtrinsic struct {
Fee decimal.Decimal `json:"fee" gorm:"type:decimal(30,0);precision:30"`
...
} but the skip migration feature sounds interesting, maybe we could support it like following, would you mind to make the change? type ChainExtrinsic struct {
Fee decimal.Decimal `json:"fee" gorm:"type:decimal(30,0);-:migration"`
...
} |
@jinzhu
|
I think it would be good to group all field permission related things into similar tags, so users can get them in one place. Maybe we could have different permission level like the |
@jinzhu |
Thank you for your PR |
I want to Add field tag to ignore migration,too What should I do now |
* Respect ignore migration when add column (#4276) continue #4028 * feat: Optimal value type acquisition for v (#4278) * feat: optimize relect value length and value * feat: optimize ConvertSliceOfMapToValuesForCreate method Co-authored-by: yrong1997 <[email protected]>
* Respect ignore migration when add column (go-gorm#4276) continue go-gorm#4028 * feat: Optimal value type acquisition for v (go-gorm#4278) * feat: optimize relect value length and value * feat: optimize ConvertSliceOfMapToValuesForCreate method Co-authored-by: yrong1997 <[email protected]>
* Add field tag to ignore migration * Fix null value with space * refactor migration tag
* Respect ignore migration when add column (go-gorm#4276) continue go-gorm#4028 * feat: Optimal value type acquisition for v (go-gorm#4278) * feat: optimize relect value length and value * feat: optimize ConvertSliceOfMapToValuesForCreate method Co-authored-by: yrong1997 <[email protected]>
What did this pull request do?
User Case Description
we can avoid by add field tag as following: