aboutsummaryrefslogtreecommitdiffstats
path: root/routers/install.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-11 21:00:12 -0400
committerUnknwon <u@gogs.io>2015-09-11 21:00:12 -0400
commit47df562ceddfaab3471e635e59039c03f47808e2 (patch)
treed74f1f762c876827126e2a10dacd8f132f8d0ffb /routers/install.go
parentc7ac237b57a28a9d3c811510cd8ac13c2f7029e3 (diff)
downloadgitea-47df562ceddfaab3471e635e59039c03f47808e2.tar.gz
gitea-47df562ceddfaab3471e635e59039c03f47808e2.zip
#1626 default db_type
Diffstat (limited to 'routers/install.go')
-rw-r--r--routers/install.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/routers/install.go b/routers/install.go
index d9c5d51cac..c4183b201d 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