aboutsummaryrefslogtreecommitdiffstats
path: root/routers/install.go
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@users.noreply.github.com>2018-09-11 10:42:40 -0400
committerGitHub <noreply@github.com>2018-09-11 10:42:40 -0400
commitf1ad4bb3d5bc67c07a1ea51cfd7f7783483b49fd (patch)
tree5a75feec1f560b426f0ff0d28703bc35b8727e9e /routers/install.go
parent8ee9922fe68531a47ce6ba8eefaf146a0a78549c (diff)
downloadgitea-f1ad4bb3d5bc67c07a1ea51cfd7f7783483b49fd.tar.gz
gitea-f1ad4bb3d5bc67c07a1ea51cfd7f7783483b49fd.zip
Remove traces of embedded TiDB (#4906)
Fix #3357
Diffstat (limited to 'routers/install.go')
-rw-r--r--routers/install.go17
1 files changed, 2 insertions, 15 deletions
diff --git a/routers/install.go b/routers/install.go
index 03b8d68165..5e97bcc93c 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -8,7 +8,6 @@ import (
"errors"
"os"
"os/exec"
- "path"
"path/filepath"
"strings"
@@ -45,9 +44,6 @@ func InstallInit(ctx *context.Context) {
if models.EnableSQLite3 {
dbOpts = append(dbOpts, "SQLite3")
}
- if models.EnableTiDB {
- dbOpts = append(dbOpts, "TiDB")
- }
ctx.Data["DbOptions"] = dbOpts
}
@@ -72,10 +68,6 @@ func Install(ctx *context.Context) {
if models.EnableSQLite3 {
ctx.Data["CurDbOption"] = "SQLite3"
}
- case "tidb":
- if models.EnableTiDB {
- ctx.Data["CurDbOption"] = "TiDB"
- }
}
// Application general settings
@@ -151,7 +143,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
// Pass basic check, now test configuration.
// Test database setting.
- dbTypes := map[string]string{"MySQL": "mysql", "PostgreSQL": "postgres", "MSSQL": "mssql", "SQLite3": "sqlite3", "TiDB": "tidb"}
+ dbTypes := map[string]string{"MySQL": "mysql", "PostgreSQL": "postgres", "MSSQL": "mssql", "SQLite3": "sqlite3"}
models.DbCfg.Type = dbTypes[form.DbType]
models.DbCfg.Host = form.DbHost
models.DbCfg.User = form.DbUser
@@ -160,16 +152,11 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
models.DbCfg.SSLMode = form.SSLMode
models.DbCfg.Path = form.DbPath
- if (models.DbCfg.Type == "sqlite3" || models.DbCfg.Type == "tidb") &&
+ if (models.DbCfg.Type == "sqlite3") &&
len(models.DbCfg.Path) == 0 {
ctx.Data["Err_DbPath"] = true
ctx.RenderWithErr(ctx.Tr("install.err_empty_db_path"), tplInstall, &form)
return
- } else if models.DbCfg.Type == "tidb" &&
- strings.ContainsAny(path.Base(models.DbCfg.Path), ".-") {
- ctx.Data["Err_DbPath"] = true
- ctx.RenderWithErr(ctx.Tr("install.err_invalid_tidb_name"), tplInstall, &form)
- return
}
// Set test engine.