Migratin data tables

DataTable Migration to new n8n instance

reserved column conflict

I need to move two data tables from one n8n instance to another (euqal versions).

But I receive errors on the standard columns:

  • _id field => Only alphabetical and non-leading numbers and underscores allowed
  • createdAt => createdAt is a reserved column
  • updatedAt is a reserved column

Of course those should keep the values of the original instance.

What is the clean way to do such a migration, without discarding data on this basic fields?

Information on your n8n setup

  • 2.2.5:
  • self hosted:

Hi @swdit

If you’re using a sql database for your n8n instances, you can connect both of them and use the Postgres node to create a workflow that reads from one db data_table and writes to the other,

You can also use the Data Table node to create any missing columns beforehand,

Alternatively, if you’re comfortable with advanced SQL queries, that approach should work as well within the Postgres node.

1 Like

ok that’s how it is supposed to work?
Sounds more like a workaround.

Hi @swdit,

As per @mohamed3nan suggestion, this seems to be correct yes. see below.

yea somehow, I’d just call it full control, since there isn’t an easier solution AFAIK,

The issue with the current “Import CSV” option is that id, createdAt, updatedAt are reserved columns so when importing, you’ll lose the original values and be forced to rename those columns, which makes the result messy duplicated (3) coulmns if you’re using these columns in your workflow,

So IMO because of that, I’d go with a direct database insert to get an import that matches the original export exactly..

1 Like

I agree with @mohamed3nan here. Please take note of the limitations and intended use for data tables. You’re better off using something like Supabase for data storage. Personally I only use data tables to store small transactions temporary data and not permanent records.