mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Fix bug on admin subcommand (#17533)
* Fix bug on admin subcommand * Add signals for all initDB Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
c9110eb5e4
commit
69b61d4373
13 changed files with 120 additions and 79 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue