n8n errors / Schema

There was an error running database migrations QueryFailedError: syntax error at or near ":"

platform: n8n / category: Schema

Cause

A previously interrupted migration left the migrations table inconsistent, so the next startup's migration runner emits a Postgres syntax error.

Fix

Export all workflows and credentials with the n8n CLI (n8n export:workflow --backup, n8n export:credentials --decrypted) first. Drop and recreate the database, let n8n run a clean migration, then re-import. Do not hand-patch the migrations table unless you know the exact failed step.

Source thread →

Part of the Automation Error Index — n8n errors: browse all.

Hitting an automation error we have not covered?

AutomateLab builds and debugs n8n, Make, and agent workflows as fixed-scope projects. If something is broken in production, tell us what you are seeing.

Describe the problem