mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
fix(core): Use table-prefixes in queries in import commands (#5887)
This commit is contained in:
committed by
GitHub
parent
32c4eef574
commit
ddbfcc7d93
@@ -228,8 +228,9 @@ export class ImportWorkflowsCommand extends BaseCommand {
|
||||
['workflowId', 'userId'],
|
||||
);
|
||||
if (config.getEnv('database.type') === 'postgresdb') {
|
||||
const tablePrefix = config.getEnv('database.tablePrefix');
|
||||
await this.transactionManager.query(
|
||||
"SELECT setval('workflow_entity_id_seq', (SELECT MAX(id) from workflow_entity))",
|
||||
`SELECT setval('${tablePrefix}workflow_entity_id_seq', (SELECT MAX(id) from "${tablePrefix}workflow_entity"))`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user