mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-11-17 17:20:26 +00:00
Postgres schema support
This commit is contained in:
1 parent
741c9c982f
commit
fc8b1fcde2
12 files changed
+117
-8
No files matched your search
@@ -37,11 +37,21 @@ func SetupDatabase(onConfigured func() error) func(http.ResponseWriter, *http.Re
|
||||
return
|
||||
}
|
||||
|
||||
// Sqlite lives in the data folder and needs nothing else
|
||||
if newCfg.GetDriver() == config.DatabaseSqlite {
|
||||
switch newCfg.GetDriver() {
|
||||
case config.DatabaseSqlite:
|
||||
// Sqlite lives in the data folder and needs nothing else
|
||||
newCfg = config.DBConfig{Driver: config.DatabaseSqlite}
|
||||
} else if newCfg.SSLMode == "" {
|
||||
newCfg.SSLMode = "disable"
|
||||
case config.DatabasePostgres:
|
||||
if newCfg.SSLMode == "" {
|
||||
newCfg.SSLMode = "disable"
|
||||
}
|
||||
newCfg.Schema = newCfg.GetSchema()
|
||||
default:
|
||||
if newCfg.SSLMode == "" {
|
||||
newCfg.SSLMode = "disable"
|
||||
}
|
||||
// Schemas are a postgres concept
|
||||
newCfg.Schema = ""
|
||||
}
|
||||
|
||||
if err := database.TestConnection(newCfg); err != nil {
|
||||
|
||||
Reference in new issue
Block a user