I’m migrating n8n 1.51.2 to a Cloud SQL instance on GCP. After importing the Postgres data, startup fails with an error about an existing ‘migrations’ table. Why are migrations running?
i had a similar issue, not sure but it worked after droppin the ‘migrations’ tabl and letting n8n recreate it. maybe check your config also in case the import didnt clear existing tracking.
I encountered a similar issue after moving to a Cloud SQL instance. In my case, the error about an existing ‘migrations’ table was due to a mismatch between the local database state and the Cloud SQL setup. I resolved it by safely backing up my data, then manually removing the table so that n8n could recreate it with the expected schema. It was also important to thoroughly review the connection settings in the new environment, as device-specific configurations can inadvertently trigger redundant migrations, leading to these errors.
After a similar migration experience, I found that the error regarding the ‘migrations’ table often indicates a misalignment between the state captured in the database and what n8n expects to see during startup. My approach was to carefully compare the schema in the Cloud SQL instance with a local instance where everything was working correctly. It turned out that some metadata had not been properly reset during the import process. Manually adjusting the tables and verifying that environment variables were consistent finally resolved the issue.