mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	models: rename EnableTidb to EnableTiDB
This commit is contained in:
		@@ -53,7 +53,7 @@ var (
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	EnableSQLite3 bool
 | 
						EnableSQLite3 bool
 | 
				
			||||||
	EnableTidb    bool
 | 
						EnableTiDB    bool
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func init() {
 | 
					func init() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,6 +13,6 @@ import (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func init() {
 | 
					func init() {
 | 
				
			||||||
	EnableTidb = true
 | 
						EnableTiDB = true
 | 
				
			||||||
	log.SetLevelByString("error")
 | 
						log.SetLevelByString("error")
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -80,7 +80,7 @@ func GlobalInit() {
 | 
				
			|||||||
	if models.EnableSQLite3 {
 | 
						if models.EnableSQLite3 {
 | 
				
			||||||
		log.Info("SQLite3 Supported")
 | 
							log.Info("SQLite3 Supported")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if models.EnableTidb {
 | 
						if models.EnableTiDB {
 | 
				
			||||||
		log.Info("TiDB Supported")
 | 
							log.Info("TiDB Supported")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if setting.SupportMiniWinService {
 | 
						if setting.SupportMiniWinService {
 | 
				
			||||||
@@ -110,7 +110,7 @@ func InstallInit(ctx *context.Context) {
 | 
				
			|||||||
	if models.EnableSQLite3 {
 | 
						if models.EnableSQLite3 {
 | 
				
			||||||
		dbOpts = append(dbOpts, "SQLite3")
 | 
							dbOpts = append(dbOpts, "SQLite3")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if models.EnableTidb {
 | 
						if models.EnableTiDB {
 | 
				
			||||||
		dbOpts = append(dbOpts, "TiDB")
 | 
							dbOpts = append(dbOpts, "TiDB")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	ctx.Data["DbOptions"] = dbOpts
 | 
						ctx.Data["DbOptions"] = dbOpts
 | 
				
			||||||
@@ -134,7 +134,7 @@ func Install(ctx *context.Context) {
 | 
				
			|||||||
			ctx.Data["CurDbOption"] = "SQLite3"
 | 
								ctx.Data["CurDbOption"] = "SQLite3"
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	case "tidb":
 | 
						case "tidb":
 | 
				
			||||||
		if models.EnableTidb {
 | 
							if models.EnableTiDB {
 | 
				
			||||||
			ctx.Data["CurDbOption"] = "TiDB"
 | 
								ctx.Data["CurDbOption"] = "TiDB"
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user