Describe the problem/error/question
I have a self-hosted solution and all is working on version 2.0.1.
I tried updating by following all stable versions up to 2.1.4, but from 2.0.2 I got this migration error.
I’m using n8n for personal projects, I didn’t do nothing fancy or custom changes in the source code.
What is the error message (if any)?
Initializing n8n process
n8n ready on ::, port 5678
Migrations in progress, please do NOT stop the process.
Starting migration BackfillMissingWorkflowHistoryRecords1765448186933
Migration "BackfillMissingWorkflowHistoryRecords1765448186933" failed, error: SQLITE_CONSTRAINT: UNIQUE constraint failed: workflow_history.versionId
There was an error running database migrations
SQLITE_CONSTRAINT: UNIQUE constraint failed: workflow_history.versionId
Information on your n8n setup
instance information
Debug info
core
- n8nVersion: 2.0.1
- platform: docker (self-hosted)
- nodeJsVersion: 22.21.0
- nodeEnv: production
- database: sqlite
- executionMode: regular
- concurrency: -1
- license: enterprise (production)
- consumerId: 7d6b7cc4-831c-463e-a8f8-bf856450efcf
storage
- success: all
- error: all
- progress: false
- manual: true
- binaryMode: filesystem
pruning
- enabled: true
- maxAge: 336 hours
- maxCount: 10000 executions
client
- userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/143.0.0.0 safari/537.36
- isTouchDevice: false
Generated at: 2025-12-31T13:24:55.360Z