set ensureSchemaExists to false to match current behavior
Signed-off-by: Chap Ambrose <cambrose@salesforce.com>
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
add ensureSchemaExists backend database config
|
||||
Added config prop `ensureSchemaExists` to support postgres instances where user can create schemas but not databases.
|
||||
|
||||
@@ -321,7 +321,10 @@ export class PgConnector implements Connector {
|
||||
let schemaOverrides;
|
||||
if (this.getPluginDivisionModeConfig() === 'schema') {
|
||||
schemaOverrides = this.getSchemaOverrides(pluginId);
|
||||
if (this.getEnsureSchemaExistsConfig(pluginId)) {
|
||||
if (
|
||||
this.getEnsureSchemaExistsConfig(pluginId) ||
|
||||
this.getEnsureExistsConfig(pluginId)
|
||||
) {
|
||||
try {
|
||||
await pgConnector.ensureSchemaExists!(pluginConfig, pluginId);
|
||||
} catch (error) {
|
||||
@@ -439,7 +442,7 @@ export class PgConnector implements Connector {
|
||||
|
||||
private getEnsureSchemaExistsConfig(pluginId: string): boolean {
|
||||
const baseConfig =
|
||||
this.config.getOptionalBoolean('ensureSchemaExists') ?? true;
|
||||
this.config.getOptionalBoolean('ensureSchemaExists') ?? false;
|
||||
return (
|
||||
this.config.getOptionalBoolean(
|
||||
`${pluginPath(pluginId)}.getEnsureSchemaExistsConfig`,
|
||||
|
||||
Reference in New Issue
Block a user