Skip to content

Commit 5febbfa

Browse files
committed
add GCLOUD_SQL_INSTANCE option while still using postgres url
1 parent fc2a465 commit 5febbfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

datastore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func getDBConnection(store *Datastore) *runner.DB {
173173

174174
if host == "GCLOUD_SQL_INSTANCE" {
175175
// USE THE GCLOUD_SQL_INSTANCE SETTING instead... e.g. host= /cloudsql/INSTANCE_CONNECTION_NAME // JC I wonder if it is always /cloudsql
176-
host = store.Settings.Get("GCLOUD_SQL_INSTANCE")
176+
host = "/cloudsql" + store.Settings.Get("GCLOUD_SQL_INSTANCE")
177177
}
178178

179179
dbStr := "dbname=" + dbName + " user=" + username + " host=" + host

0 commit comments

Comments
 (0)