Explorar o código

Merge pull request #597 from luto/fix-mysql-engine

force the use of InnoDB as db engine for all tables
无闻 %!s(int64=10) %!d(string=hai) anos
pai
achega
5b290013a9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      models/models.go

+ 1 - 1
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