From 47df562ceddfaab3471e635e59039c03f47808e2 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 11 Sep 2015 21:00:12 -0400 Subject: [PATCH] #1626 default db_type --- routers/install.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/routers/install.go b/routers/install.go index d9c5d51cac5..c4183b201df 100644 --- a/routers/install.go +++ b/routers/install.go @@ -104,10 +104,14 @@ func Install(ctx *middleware.Context) { form.DbName = models.DbCfg.Name form.DbPath = models.DbCfg.Path - if models.EnableSQLite3 { - ctx.Data["CurDbOption"] = "SQLite3" // Default when enabled. - } else { - ctx.Data["CurDbOption"] = "MySQL" + ctx.Data["CurDbOption"] = "MySQL" + switch models.DbCfg.Type { + case "postgres": + ctx.Data["CurDbOption"] = "PostgreSQL" + case "sqlite3": + if models.EnableSQLite3 { + ctx.Data["CurDbOption"] = "SQLite3" // Default when enabled. + } } // Application general settings