mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(Postgres Node): Connection pool of the database object has been destroyed (#7074)
Github issue / Community forum post (link here to close automatically):
This commit is contained in:
@@ -458,3 +458,16 @@ export function checkItemAgainstSchema(
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
export const configureTableSchemaUpdater = (initialSchema: string, initialTable: string) => {
|
||||
let currentSchema = initialSchema;
|
||||
let currentTable = initialTable;
|
||||
return async (db: PgpDatabase, tableSchema: ColumnInfo[], schema: string, table: string) => {
|
||||
if (currentSchema !== schema || currentTable !== table) {
|
||||
currentSchema = schema;
|
||||
currentTable = table;
|
||||
tableSchema = await getTableSchema(db, schema, table);
|
||||
}
|
||||
return tableSchema;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user