From bff1e157d556a9b39ddf3c1b617c2795c01a4d81 Mon Sep 17 00:00:00 2001 From: luto Date: Tue, 28 Oct 2014 16:40:09 +0100 Subject: [PATCH] force the use of InnoDB as db engine for all tables, fixes #59 --- models/models.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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