Skip to content

Commit 1d70d10

Browse files
committed
remove tidb totally
1 parent 18fd92c commit 1d70d10

File tree

4 files changed

+0
-18
lines changed

4 files changed

+0
-18
lines changed

models/migrations/v27.go

-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ func convertIntervalToDuration(x *xorm.Engine) (err error) {
4141
_, err = sess.Exec("ALTER TABLE mirror MODIFY `interval` BIGINT")
4242
case "postgres":
4343
_, err = sess.Exec("ALTER TABLE mirror ALTER COLUMN \"interval\" SET DATA TYPE bigint")
44-
case "tidb":
45-
_, err = sess.Exec("ALTER TABLE mirror MODIFY `interval` BIGINT")
4644
case "mssql":
4745
_, err = sess.Exec("ALTER TABLE mirror ALTER COLUMN \"interval\" BIGINT")
4846
case "sqlite3":

models/migrations/v81.go

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ func changeU2FCounterType(x *xorm.Engine) error {
1414
var err error
1515

1616
switch x.Dialect().DriverName() {
17-
case "tidb":
18-
fallthrough
1917
case "mysql":
2018
_, err = x.Exec("ALTER TABLE `u2f_registration` MODIFY `counter` BIGINT")
2119
case "postgres":

modules/setting/database.go

-11
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ var (
2323
// EnableSQLite3 use SQLite3, set by build flag
2424
EnableSQLite3 bool
2525

26-
// EnableTiDB enable TiDB, set by build flag
27-
EnableTiDB bool
28-
2926
// Database holds the database settings
3027
Database = struct {
3128
Type string
@@ -124,14 +121,6 @@ func DBConnStr() (string, error) {
124121
return "", fmt.Errorf("Failed to create directories: %v", err)
125122
}
126123
connStr = fmt.Sprintf("file:%s?cache=shared&mode=rwc&_busy_timeout=%d", Database.Path, Database.Timeout)
127-
case "tidb":
128-
if !EnableTiDB {
129-
return "", errors.New("this binary version does not build support for TiDB")
130-
}
131-
if err := os.MkdirAll(path.Dir(Database.Path), os.ModePerm); err != nil {
132-
return "", fmt.Errorf("Failed to create directories: %v", err)
133-
}
134-
connStr = "goleveldb://" + Database.Path
135124
default:
136125
return "", fmt.Errorf("Unknown database type: %s", Database.Type)
137126
}

routers/init.go

-3
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ func GlobalInit() {
105105
if setting.EnableSQLite3 {
106106
log.Info("SQLite3 Supported")
107107
}
108-
if setting.EnableTiDB {
109-
log.Info("TiDB Supported")
110-
}
111108
checkRunMode()
112109

113110
if setting.InstallLock && setting.SSH.StartBuiltinServer {

0 commit comments

Comments
 (0)