mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-20 14:00:04 +02:00
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
|
@ -58,7 +58,6 @@ It can be used for backup and capture Gitea server image to send to maintainer`,
|
|||
func runDump(ctx *cli.Context) error {
|
||||
setting.NewContext()
|
||||
setting.NewServices() // cannot access session settings otherwise
|
||||
models.LoadConfigs()
|
||||
|
||||
err := models.SetEngine()
|
||||
if err != nil {
|
||||
|
@ -104,8 +103,8 @@ func runDump(ctx *cli.Context) error {
|
|||
}
|
||||
|
||||
targetDBType := ctx.String("database")
|
||||
if len(targetDBType) > 0 && targetDBType != models.DbCfg.Type {
|
||||
log.Printf("Dumping database %s => %s...", models.DbCfg.Type, targetDBType)
|
||||
if len(targetDBType) > 0 && targetDBType != setting.Database.Type {
|
||||
log.Printf("Dumping database %s => %s...", setting.Database.Type, targetDBType)
|
||||
} else {
|
||||
log.Printf("Dumping database...")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue