aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2020-03-27 10:44:05 +0200
committerGitHub <noreply@github.com>2020-03-27 10:44:05 +0200
commita3f90948d8fa4dd5c92e15cc10e86d2fec37f6e7 (patch)
treeaf9b95096068e22d91ebaa541b2c1b4dafbbbca5 /models
parent453f6e6e5a0c9ac43c5d30d14f036d93742894d4 (diff)
downloadgitea-a3f90948d8fa4dd5c92e15cc10e86d2fec37f6e7.tar.gz
gitea-a3f90948d8fa4dd5c92e15cc10e86d2fec37f6e7.zip
Set MySQL rowtype to dynamic for new tables (#10833)
* Set mysql rowtype to dynamic for new tables * Update models.go
Diffstat (limited to 'models')
-rw-r--r--models/models.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/models.go b/models/models.go
index 08c7780317..d2872422e3 100644
--- a/models/models.go
+++ b/models/models.go
@@ -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
}