1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

Set MySQL rowtype to dynamic for new tables (#10833)

* Set mysql rowtype to dynamic for new tables

* Update models.go
This commit is contained in:
Lauris BH 2020-03-27 10:44:05 +02:00 committed by GitHub
parent 453f6e6e5a
commit a3f90948d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,6 +142,9 @@ func getEngine() (*xorm.Engine, error) {
if err != nil {
return nil, err
}
if setting.Database.Type == "mysql" {
engine.Dialect().SetParams(map[string]string{"rowFormat": "DYNAMIC"})
}
engine.SetSchema(setting.Database.Schema)
return engine, nil
}