Skip to content

Commit

Permalink
Set MySQL rowtype to dynamic for new tables (#10833)
Browse files Browse the repository at this point in the history
* Set mysql rowtype to dynamic for new tables

* Update models.go
  • Loading branch information
lafriks committed Mar 27, 2020
1 parent 453f6e6 commit a3f9094
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a3f9094

Please sign in to comment.