Closed diluga closed 4 years ago
This issue has been automatically marked as stale as it missing playground pull request link, checkout https://github.com/go-gorm/playground for details, it will be closed in 2 days if no further activity occurs. if you are asking question, please use the Question
template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨
set size for field UserRefer
, e.g:
type CreditCard struct {
Number string
UserRefer string `gorm:"size:191"`
}
set size for field
UserRefer
, e.g:type CreditCard struct { Number string UserRefer string `gorm:"size:191"` }
thx!
set size for field
UserRefer
, e.g:type CreditCard struct { Number string UserRefer string `gorm:"size:191"` }
@diluga Thanks this works for me too
What is the difference with the length
attribute?
Description
when i used User.Name for primary_key,call AutoMigrate() will got error,like this:
my models :
ENV