Upgrade from 1.61.0 fails

Hello
I upgraded n8n from time to time, up to 1.61.0
and I can not upgrade to a newer version
I tried 1.62.6, 1.63.4, 1.67.1
each time with the same issue:

User settings loaded from: /home/node/.n8n/config
Initializing n8n process
n8n ready on 0.0.0.0, port 5678
Migrations in progress, please do NOT stop the process.
Starting migration AddApiKeysTable1724951148974
Migration “AddApiKeysTable1724951148974” failed, error: SQLITE_ERROR: there is already another table or index with this name: user
Error: There was an error running database migrations
QueryFailedError: SQLITE_ERROR: there is already another table or index with this name: user
and it crashes

I’m on docker, with sqlite database

thanks for your help

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
  • n8n version: 1.61.0
  • Database (default: SQLite): default: SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default: own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: centos 7

This looks like a migration that was introduced in [email protected] did not manage to finish properly, but parts of the changes from that migration was still somehow committed. Not sure why something like this would happen, unless the migration finished, but the process was terminated right after.

If you have a backup, you could try importing that into a new instance.
If not, you could try going back to 1.61.0, export your workflow+credentials, and then try to import that into a new instance.