Skip to content

Commit a3f9094

Browse files
authored
Set MySQL rowtype to dynamic for new tables (#10833)
* Set mysql rowtype to dynamic for new tables * Update models.go
1 parent 453f6e6 commit a3f9094

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

models/models.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ func getEngine() (*xorm.Engine, error) {
142142
if err != nil {
143143
return nil, err
144144
}
145+
if setting.Database.Type == "mysql" {
146+
engine.Dialect().SetParams(map[string]string{"rowFormat": "DYNAMIC"})
147+
}
145148
engine.SetSchema(setting.Database.Schema)
146149
return engine, nil
147150
}

0 commit comments

Comments
 (0)