diff --git a/models/models.go b/models/models.go index 46716728..b4f5f0a2 100644 --- a/models/models.go +++ b/models/models.go @@ -129,7 +129,7 @@ func NewEngine() (err error) { if err = SetEngine(); err != nil { return err } - if err = x.Sync2(tables...); err != nil { + if err = x.StoreEngine("InnoDB").Sync2(tables...); err != nil { return fmt.Errorf("sync database struct error: %v\n", err) } return nil