-
-
Notifications
You must be signed in to change notification settings - Fork 661
Closed
Description
I am a new comer. the sea-orm is amazing.
I am familiar with gorm.
in gorm, the migrate is auto, very convenient.
firstly, you can define a struct and table name.
type ColumnOriC4 struct {
Name string `gorm:"column:name"`
Desc string `gorm:"column:desc"`
}
func (ColumnOriC4) TableName() string {
return "tab_conf_c4_columnoric4_info"
}
secondly, only code like this with db connect.
db.AutoMigrate(&ColumnOriC4{})
no need cli. when the table changed, the migrate is auto.
coder no need to care about that.
I think maybe it is a idea to migrate. Thanks.
Metadata
Metadata
Assignees
Labels
No labels