summaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-07-31 11:05:06 +0800
committerUnknwon <u@gogs.io>2015-07-31 11:05:06 +0800
commit42a2c5ca54974fbf24c67e10a54224c987e0aeea (patch)
tree3582c98aabf4b8484b6fbf150d6aff47814c20c7 /models/models.go
parent3ff708b7497555797aa07ddfe0c44fa9e71f392c (diff)
downloadgitea-42a2c5ca54974fbf24c67e10a54224c987e0aeea.tar.gz
gitea-42a2c5ca54974fbf24c67e10a54224c987e0aeea.zip
#1400 use new connstr format for postgres
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/models.go b/models/models.go
index b7986fed11..44fd563135 100644
--- a/models/models.go
+++ b/models/models.go
@@ -105,7 +105,7 @@ func getEngine() (*xorm.Engine, error) {
if len(fields) > 1 && len(strings.TrimSpace(fields[1])) > 0 {
port = fields[1]
}
- cnnstr = fmt.Sprintf("user=%s password=%s host=%s port=%s dbname=%s sslmode=%s",
+ cnnstr = fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=%s",
DbCfg.User, DbCfg.Passwd, host, port, DbCfg.Name, DbCfg.SSLMode)
case "sqlite3":
if !EnableSQLite3 {