fix: Make --dump-schema work with in-database pgrst.db_schemas setting

This needs to be loaded from in-database configuration first, otherwise
the dump-schema output will be for the default (public) schema.
This commit is contained in:
Wolfgang Walther
2024-07-09 08:31:31 +02:00
committed by Wolfgang Walther
parent ee4bfbf253
commit 957472a7a7
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -44,7 +44,9 @@ main CLI{cliCommand, cliPath} = do
CmdDumpConfig -> do
when configDbConfig $ AppState.reReadConfig True appState
putStr . Config.toText =<< AppState.getConfig appState
CmdDumpSchema -> putStrLn =<< dumpSchema appState
CmdDumpSchema -> do
when configDbConfig $ AppState.reReadConfig True appState
putStrLn =<< dumpSchema appState
CmdRun -> App.run appState)
-- | Dump SchemaCache schema to JSON