mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 00:11:04 +00:00 
			
		
		
		
	#1626 default db_type
This commit is contained in:
		
					parent
					
						
							
								c7ac237b57
							
						
					
				
			
			
				commit
				
					
						47df562ced
					
				
			
		
					 1 changed files with 8 additions and 4 deletions
				
			
		| 
						 | 
					@ -104,10 +104,14 @@ func Install(ctx *middleware.Context) {
 | 
				
			||||||
	form.DbName = models.DbCfg.Name
 | 
						form.DbName = models.DbCfg.Name
 | 
				
			||||||
	form.DbPath = models.DbCfg.Path
 | 
						form.DbPath = models.DbCfg.Path
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if models.EnableSQLite3 {
 | 
						ctx.Data["CurDbOption"] = "MySQL"
 | 
				
			||||||
		ctx.Data["CurDbOption"] = "SQLite3" // Default when enabled.
 | 
						switch models.DbCfg.Type {
 | 
				
			||||||
	} else {
 | 
						case "postgres":
 | 
				
			||||||
		ctx.Data["CurDbOption"] = "MySQL"
 | 
							ctx.Data["CurDbOption"] = "PostgreSQL"
 | 
				
			||||||
 | 
						case "sqlite3":
 | 
				
			||||||
 | 
							if models.EnableSQLite3 {
 | 
				
			||||||
 | 
								ctx.Data["CurDbOption"] = "SQLite3" // Default when enabled.
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Application general settings
 | 
						// Application general settings
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue