Browse Source
Set MySQL rowtype to dynamic for new tables (#10833)
* Set mysql rowtype to dynamic for new tables
* Update models.go
tags/v1.21.12.1
Lauris BH
GitHub
5 years ago
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
0 deletions
-
models/models.go
|
|
@@ -142,6 +142,9 @@ func getEngine() (*xorm.Engine, error) { |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return nil, err |
|
|
return nil, err |
|
|
} |
|
|
} |
|
|
|
|
|
if setting.Database.Type == "mysql" { |
|
|
|
|
|
engine.Dialect().SetParams(map[string]string{"rowFormat": "DYNAMIC"}) |
|
|
|
|
|
} |
|
|
engine.SetSchema(setting.Database.Schema) |
|
|
engine.SetSchema(setting.Database.Schema) |
|
|
return engine, nil |
|
|
return engine, nil |
|
|
} |
|
|
} |
|
|
|