fix: Take PG version into account in --dump-schema

The PG version is only read by the Connection Worker, which is not used in the case dump-schema. Now, the pg version is read in the schema cache queries directly, avoiding this problem in all cases.

Signed-off-by: Wolfgang Walther <walther@technowledgy.de>
This commit is contained in:
Wolfgang Walther
2022-02-05 17:48:22 +01:00
committed by Wolfgang Walther
parent 52d628f1ed
commit ded8981368
6 changed files with 14 additions and 12 deletions
+2 -4
View File
@@ -67,7 +67,6 @@ main = do
loadDbStructure pool
(configDbSchemas testCfg)
(configDbExtraSearchPath testCfg)
actualPgVersion
let
-- For tests that run with the same refDbStructure
@@ -85,7 +84,6 @@ main = do
loadDbStructure pool
(configDbSchemas config)
(configDbExtraSearchPath config)
actualPgVersion
appState <- AppState.initWithPool pool config
AppState.putPgVersion appState actualPgVersion
AppState.putDbStructure appState (Just customDbStructure)
@@ -236,5 +234,5 @@ main = do
describe "Feature.RollbackForcedSpec" Feature.RollbackSpec.forced
where
loadDbStructure pool schemas extraSearchPath actualPgVersion =
either (panic.show) id <$> P.use pool (HT.transaction HT.ReadCommitted HT.Read $ queryDbStructure (toList schemas) extraSearchPath actualPgVersion True)
loadDbStructure pool schemas extraSearchPath =
either (panic.show) id <$> P.use pool (HT.transaction HT.ReadCommitted HT.Read $ queryDbStructure (toList schemas) extraSearchPath True)