Add db-extra-search-path config (#1218)

For adding schemas to the search_path, solves issues related to extensions created in the public schema.
This commit is contained in:
Steve Chávez
2018-12-08 11:39:31 -05:00
committed by GitHub
parent 0d6d112b38
commit 501edc718d
13 changed files with 126 additions and 25 deletions
+5
View File
@@ -78,6 +78,8 @@ _baseCfg = -- Connection Settings
]
-- Default role claim key
(Right [JSPKey "role"])
-- Empty db-extra-search-path
[]
testCfg :: Text -> AppConfig
testCfg testDbConn = _baseCfg { configDatabase = testDbConn }
@@ -122,6 +124,9 @@ testCfgAsymJWKSet testDbConn = (testCfg testDbConn) {
testNonexistentSchemaCfg :: Text -> AppConfig
testNonexistentSchemaCfg testDbConn = (testCfg testDbConn) { configSchema = "nonexistent" }
testCfgExtraSearchPath :: Text -> AppConfig
testCfgExtraSearchPath testDbConn = (testCfg testDbConn) { configExtraSearchPath = ["public", "extensions"] }
setupDb :: Text -> IO ()
setupDb dbConn = do
loadFixture dbConn "database"