diff --git a/packages/cli/src/commands/import/credentials.ts b/packages/cli/src/commands/import/credentials.ts index efed0a972c..985c70fe89 100644 --- a/packages/cli/src/commands/import/credentials.ts +++ b/packages/cli/src/commands/import/credentials.ts @@ -169,8 +169,9 @@ export class ImportCredentialsCommand extends BaseCommand { ['credentialsId', 'userId'], ); if (config.getEnv('database.type') === 'postgresdb') { + const tablePrefix = config.getEnv('database.tablePrefix'); await this.transactionManager.query( - "SELECT setval('credentials_entity_id_seq', (SELECT MAX(id) from credentials_entity))", + `SELECT setval('${tablePrefix}credentials_entity_id_seq', (SELECT MAX(id) from ${tablePrefix}credentials_entity))`, ); } } diff --git a/packages/cli/src/commands/import/workflow.ts b/packages/cli/src/commands/import/workflow.ts index df93f7f79f..5bbb956e76 100644 --- a/packages/cli/src/commands/import/workflow.ts +++ b/packages/cli/src/commands/import/workflow.ts @@ -215,8 +215,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"))`, ); } }