Adding config prop usePluginSchemas to allow plugins using the pg client to create their own management schemas in the db. This allows pg client plugins to work in separate schemas in the same db.

Signed-off-by: Greg Bomkamp <Gregory.Bomkamp@libertymutual.com>
This commit is contained in:
Greg Bomkamp
2021-10-28 10:43:22 -04:00
parent dd028ea861
commit 7ad9a07b27
11 changed files with 497 additions and 22 deletions
+10
View File
@@ -69,6 +69,16 @@ export interface Config {
* Defaults to true if unspecified.
*/
ensureExists?: boolean;
/**
* Whether plugins should use their own schemas instead of databases. If enabled,
* each plugin will create a schema in the configured database instance
* using the `pluginId` as its schema name.
*
* NOTE: Currently only supported by the `pg` client.
*
* @default false
*/
usePluginSchemas?: boolean;
/** Plugin specific database configuration and client override */
plugin?: {
[pluginId: string]: {