N8n Fails to Start After Connecting to a New Database Due to Migration Error

Migrating an n8n installation to GCP Cloud Run results in a startup error as it attempts to alter an existing migrations table unexpectedly. What triggers this action?

i think it’s auto-triggered by a version mismatch in the db. n8n sees diff info in the migrations table and tries to update it. check your config and ensure the schema matches what n8n expects, so it doesn’t try altering your table.

I encountered a similar issue when connecting n8n to a different database. The startup error was provoked by an automatic check against the migration state stored in the existing table. When n8n detected a mismatch between the expected migration version and the data in the table, it attempted to apply changes. This situation usually arises when settings or environment variables present a shift in the schema expectations. Verifying the database schema and ensuring that version-specific parameters are correctly configured helped me resolve the problem.