Skip to content

Commit

Permalink
remove tidb totally
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Aug 15, 2019
1 parent 18fd92c commit 1d70d10
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
2 changes: 0 additions & 2 deletions models/migrations/v27.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ func convertIntervalToDuration(x *xorm.Engine) (err error) {
_, err = sess.Exec("ALTER TABLE mirror MODIFY `interval` BIGINT")
case "postgres":
_, err = sess.Exec("ALTER TABLE mirror ALTER COLUMN \"interval\" SET DATA TYPE bigint")
case "tidb":
_, err = sess.Exec("ALTER TABLE mirror MODIFY `interval` BIGINT")
case "mssql":
_, err = sess.Exec("ALTER TABLE mirror ALTER COLUMN \"interval\" BIGINT")
case "sqlite3":
Expand Down
2 changes: 0 additions & 2 deletions models/migrations/v81.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ func changeU2FCounterType(x *xorm.Engine) error {
var err error

switch x.Dialect().DriverName() {
case "tidb":
fallthrough
case "mysql":
_, err = x.Exec("ALTER TABLE `u2f_registration` MODIFY `counter` BIGINT")
case "postgres":
Expand Down
11 changes: 0 additions & 11 deletions modules/setting/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ var (
// EnableSQLite3 use SQLite3, set by build flag
EnableSQLite3 bool

// EnableTiDB enable TiDB, set by build flag
EnableTiDB bool

// Database holds the database settings
Database = struct {
Type string
Expand Down Expand Up @@ -124,14 +121,6 @@ func DBConnStr() (string, error) {
return "", fmt.Errorf("Failed to create directories: %v", err)
}
connStr = fmt.Sprintf("file:%s?cache=shared&mode=rwc&_busy_timeout=%d", Database.Path, Database.Timeout)
case "tidb":
if !EnableTiDB {
return "", errors.New("this binary version does not build support for TiDB")
}
if err := os.MkdirAll(path.Dir(Database.Path), os.ModePerm); err != nil {
return "", fmt.Errorf("Failed to create directories: %v", err)
}
connStr = "goleveldb://" + Database.Path
default:
return "", fmt.Errorf("Unknown database type: %s", Database.Type)
}
Expand Down
3 changes: 0 additions & 3 deletions routers/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ func GlobalInit() {
if setting.EnableSQLite3 {
log.Info("SQLite3 Supported")
}
if setting.EnableTiDB {
log.Info("TiDB Supported")
}
checkRunMode()

if setting.InstallLock && setting.SSH.StartBuiltinServer {
Expand Down

0 comments on commit 1d70d10

Please sign in to comment.