|
@ -15,7 +15,7 @@ import ( |
|
|
"github.com/go-xorm/xorm" |
|
|
"github.com/go-xorm/xorm" |
|
|
_ "github.com/lib/pq" |
|
|
_ "github.com/lib/pq" |
|
|
|
|
|
|
|
|
"github.com/gogits/gogs/models/migrations" |
|
|
|
|
|
|
|
|
// "github.com/gogits/gogs/models/migrations"
|
|
|
"github.com/gogits/gogs/modules/setting" |
|
|
"github.com/gogits/gogs/modules/setting" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
@ -136,9 +136,9 @@ func NewEngine() (err error) { |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if err = migrations.Migrate(x); err != nil { |
|
|
|
|
|
return err |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// if err = migrations.Migrate(x); err != nil {
|
|
|
|
|
|
// return err
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
if err = x.StoreEngine("InnoDB").Sync2(tables...); err != nil { |
|
|
if err = x.StoreEngine("InnoDB").Sync2(tables...); err != nil { |
|
|
return fmt.Errorf("sync database struct error: %v\n", err) |
|
|
return fmt.Errorf("sync database struct error: %v\n", err) |
|
|