How to add a column in workflow_entity in n8n database

how to add a column in workflow_entity in n8n database

Hey @joe, welcome to the community :tada:

Can you elaborate a bit on your plans?

I am curious because I’d usually avoid modifying the database structure expected by any program (not just n8n). This is typically untested and might break things now or in the future. A much easier approach could be to simply create a new database table and reference entries from workflow_entity by their id.

As for adding new columns to an SQL database (whether that’s an sqlite db or something else), the exact tool and approach to use would depend on your database. The basic query would be described here though: SQL ADD

I start an internship program at a startup and as part of their solution, they asked me to use n8n allowing their clients to create integrations, using the app they developed and other apps, so each client can create one or many workflows.
I decided to add a clientId column in the column workflow_ entity table.
Therefore I tried to add a new column in the WorkflowEntity.ts file
image
but I found issues with the migrations and typeorm.
Your idea is the best but knowing how to add a column directly, would be nice,
hope you can help me
thanks.

In this case, there is no need to develop that yourself. We are currently building user management which will enable exactly that. If nothing huge comes up, it will be released next week or the week afterward.

The only important thing to remember is that the company you work for needs a special license agreement with n8n to do what you described. If they are not already in contact with us they should reach out via the form on the following page: https://n8n.io/embed

1 Like

thanks a lot for your help

You are welcome. Have fun!

1 Like