Migration ID mismatch Issue

~/.n8n $ n8n import:entities --inputDir=./outputs/ --truncateTables
Error tracking disabled because this release is older than 6 weeks.

:warning::warning: This feature is currently under development. :warning::warning:

:rocket: Starting entity import…
:file_folder: Input directory: ./outputs/
:wastebasket: Truncate tables: true

:clamp: Found entities.zip file, decompressing to ./outputs/…
:white_check_mark: Successfully decompressed entities.zip
Latest migration in import data: DropUnusedChatHubColumns1760965142113 (timestamp: 1760965142113, id: 103)
Latest migration in target database: DropUnusedChatHubColumns1760965142113 (timestamp: 1760965142113, id: 106)
:cross_mark: Error importing entities. See log messages for details.

Error details:

====================================

Migration ID mismatch. Import data: DropUnusedChatHubColumns1760965142113 (id: 103) does not match target database DropUnusedChatHubColumns1760965142113 (id: 106). Cannot import data from different migration states.

Migration ID mismatch. Import data: DropUnusedChatHubColumns1760965142113 (id: 103) does not match target database DropUnusedChatHubColumns1760965142113 (id: 106). Cannot import data from different migration states.

My current setup is:

  • Docker with SQLite, N8N version. 1.117.2

What i am trying to do is, migration everything from this docker to k8s and deploy it with postgresql. I have setup the n8n and postgres instance in k8s, but when i export entities from my old setup, & import it to this new one. I get above error. The image using in docker and k8s are the same.

This error typically occurs when there’s a mismatch between the database schema versions of your source and target n8n instances. The import feature is still experimental (as noted by the warning).

Try this:

1. Make sure both n8n instances are running the exact same version

2. If possible, export/import between identical versions first

If you’re migrating between different database types (like SQLite to PostgreSQL), you might need to manually adjust the migration files to match the target schema.