Move database settings from models to setting (#7806)
* move database settings from models to setting * update docs * fix checkout pr * fix tests * fix lint * remove unsupported tidb options * correct wrong variable name * remove tidb totally
This commit is contained in:
parent
26af3401c3
commit
f83db078f0
35 changed files with 423 additions and 376 deletions
|
@ -79,16 +79,16 @@ func runPR() {
|
|||
setting.CheckLFSVersion()
|
||||
//models.LoadConfigs()
|
||||
/*
|
||||
models.DbCfg.Type = "sqlite3"
|
||||
models.DbCfg.Path = ":memory:"
|
||||
models.DbCfg.Timeout = 500
|
||||
setting.Database.Type = "sqlite3"
|
||||
setting.Database.Path = ":memory:"
|
||||
setting.Database.Timeout = 500
|
||||
*/
|
||||
db := setting.Cfg.Section("database")
|
||||
db.NewKey("DB_TYPE", "sqlite3")
|
||||
db.NewKey("PATH", ":memory:")
|
||||
setting.LogSQL = true
|
||||
models.LoadConfigs()
|
||||
|
||||
routers.NewServices()
|
||||
setting.Database.LogSQL = true
|
||||
//x, err = xorm.NewEngine("sqlite3", "file::memory:?cache=shared")
|
||||
|
||||
var helper testfixtures.Helper = &testfixtures.SQLite{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue