N8N 1.90.0: There was an error running database migrations

Describe the problem/error/question

1|n8n | There was an error running database migrations
1|n8n | column “ZfmiJYuNv3ekva5s” does not exist
PM2 | App [n8n:1] exited with code [1] via signal [SIGINT]
PM2 | App [n8n:1] starting in -fork mode-
PM2 | App [n8n:1] online

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:1.90.0
  • **Database (default: SQLite):Postgres
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):npm
  • **Operating system:ec2

Hello,

I have the same issue when I tried to update to 1.90.0

Got the same issue as well

Migrations in progress, please do NOT stop the process.
Starting migration AddScopesColumnToApiKeys1742918400000
Migration "AddScopesColumnToApiKeys1742918400000" failed, error: column "p0waTebe3DZ6mmo5" does not exist
There was an error running database migrations
column "p0waTebe3DZ6mmo5" does not exist
User settings loaded from: /home/node/.n8n/config
Last session crashed
Initializing n8n process
n8n ready on 0.0.0.0, port 5678
Migrations in progress, please do NOT stop the process.
Starting migration AddScopesColumnToApiKeys1742918400000
Migration "AddScopesColumnToApiKeys1742918400000" failed, error: column "p0waTebe3DZ6mmo5" does not exist
There was an error running database migrations
column "p0waTebe3DZ6mmo5" does not exist
User settings loaded from: /home/node/.n8n/config
Last session crashed

Okay, I think I found the root cause of the issue. (CC: @netroy)

I’m not exactly sure what happened under the hood, but in my case, the column was found in the user_api_keys root, and the label was n8n

So the first thing that came to mind was that it might be related to the n8n API credentials.
image

I deleted that specific credential, and surprisingly, the upgrade and migration were successful!

So basically, just delete the n8n account API from the credentials and give it a try.

3 Likes

This was fixed in fix(core): ID quoting in add scopes migration by RicardoE105 · Pull Request #14788 · n8n-io/n8n · GitHub
and released in 1.91.0.

For the future,

  1. please check github issues for issues with new releases, and if you don’t see an issue, please feel free to create one :pray:
  2. please don’t summon me on threads that I’m not already participating in. We have designated folks to handle conversations here, who’ll get to the threads as soon as they can :pray:
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.