diff options
author | Unknwon <u@gogs.io> | 2015-07-31 11:05:06 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-07-31 11:05:06 +0800 |
commit | 42a2c5ca54974fbf24c67e10a54224c987e0aeea (patch) | |
tree | 3582c98aabf4b8484b6fbf150d6aff47814c20c7 /models/models.go | |
parent | 3ff708b7497555797aa07ddfe0c44fa9e71f392c (diff) | |
download | gitea-42a2c5ca54974fbf24c67e10a54224c987e0aeea.tar.gz gitea-42a2c5ca54974fbf24c67e10a54224c987e0aeea.zip |
#1400 use new connstr format for postgres
Diffstat (limited to 'models/models.go')
-rw-r--r-- | models/models.go | 2 |
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 { |