summaryrefslogtreecommitdiffstats
path: root/routers/install/install.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-07 11:11:27 +0800
committerGitHub <noreply@github.com>2021-11-07 11:11:27 +0800
commit69b61d437357235700306f28d22d21acc39bb2b5 (patch)
tree33af1d4d797b428556a323837fcc3eda38a54479 /routers/install/install.go
parentc9110eb5e4657e018695f084f37e1b423939e9e0 (diff)
downloadgitea-69b61d437357235700306f28d22d21acc39bb2b5.tar.gz
gitea-69b61d437357235700306f28d22d21acc39bb2b5.zip
Fix bug on admin subcommand (#17533)
* Fix bug on admin subcommand * Add signals for all initDB Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'routers/install/install.go')
-rw-r--r--routers/install/install.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/install/install.go b/routers/install/install.go
index e38b51fb7e..837467056d 100644
--- a/routers/install/install.go
+++ b/routers/install/install.go
@@ -198,7 +198,7 @@ func SubmitInstall(ctx *context.Context) {
setting.Database.SSLMode = form.SSLMode
setting.Database.Charset = form.Charset
setting.Database.Path = form.DbPath
-
+ setting.Database.LogSQL = !setting.IsProd
setting.PasswordHashAlgo = form.PasswordAlgorithm
if (setting.Database.Type == "sqlite3") &&
@@ -209,7 +209,7 @@ func SubmitInstall(ctx *context.Context) {
}
// Set test engine.
- if err = db.InitInstallEngineWithMigration(ctx, migrations.Migrate); err != nil {
+ if err = db.InitEngineWithMigration(ctx, migrations.Migrate); err != nil {
if strings.Contains(err.Error(), `Unknown database type: sqlite3`) {
ctx.Data["Err_DbType"] = true
ctx.RenderWithErr(ctx.Tr("install.sqlite3_not_available", "https://docs.gitea.io/en-us/install-from-binary/"), tplInstall, &form)