Describe the problem/error/question
I installed n8n by npm install -g n8n. Then I ran n8n start, migrations failed.
What is the error message (if any)?
root@n8n:~ # N8N_LISTEN_ADDRESS=0.0.0.0 n8n
No encryption key found - Auto-generating and saving to: /root/.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 InitialMigration1588102412422
Finished migration InitialMigration1588102412422
Starting migration WebhookModel1592445003908
Finished migration WebhookModel1592445003908
Starting migration CreateIndexStoppedAt1594825041918
Finished migration CreateIndexStoppedAt1594825041918
Starting migration MakeStoppedAtNullable1607431743769
Migration "MakeStoppedAtNullable1607431743769" failed, error: SQLITE_ERROR: no such column: "execution_entity" - should this be a string literal in single-quotes?
There was an error running database migrations
SQLITE_ERROR: no such column: "execution_entity" - should this be a string literal in single-quotes?
Please share your workflow
# n8n
Information on your n8n setup
- n8n version: 2.8.0
- Database (default: SQLite): SQLite
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm
- Operating system: FreeBSD 15.0
Hey @windymelt Welcome !
The problem is a You are installing n8n from a public repository which installs the latest version of n8n which is much newer than your current SQLite DB. (Assuming you’re not on a VPS)
The migration “MakeStoppedAtNullable1607431743769” expects a column that doesn’t exist in your DB because earlier migrations never created it.
The Solution : Short one
If you do not care about existing data and it is a fresh install.
Delete n8n altogether and then start over. That would be all.
Generate a fresh database in SQLite DB and then create a new database structure.
Execute all migrations successfully and most of the times the issue gets solved right away.
BUT
If existing workflows matter to you. (Long approach)
If your database was created on an older version of n8n, you’ll have to uninstall the global n8n package and then install n8n globally at 0.155.0. once it’s done then run n8n. (Update gradually don’t go to the latest version directly)
(My recommendation) Switch Data Source to Postgres (If you are familiar with it)
SQLite is suitable for demonstration and experimentation but it cannot handle workloads for production level test/stress but Postgres prevents it.
If you wish to implement this then:
Change the environment variables to switch.
DB_POSTGRESDB_HOST= localhost
DB_POSTGRESDB_DATABASE=n8n.
DB_POSTGRESDB_USER= Data Processing Systems and Networks n8n.
DB_POSTGRESDB_PASS=hidden.
After performing the setting, restart n8n.
The problem you are facing happens to people as the database and the version of n8n do not align, but after this you’ll be Set.
Hi @windymelt
Welcomo to the n8n community!
Just passing by to confirm that this behavior is expected when the database schema doesn’t match the version of n8n that’s running—it’s not a workflow issue or a user configuration problem.
As mentioned above, in fresh setups resetting the database usually resolves this quickly. For anyone planning to evolve their environment or avoid this type of error in future upgrades, it’s worth considering running n8n in an officially supported environment like Docker or Linux and, if possible, using PostgreSQL from the start. This way you avoid this kind of friction early on and gain more predictability in future updates.
Hope this helps close the loop! Let me know if you have any other questions. 
Hi @windymelt Welcome!
As i agree what @Deepankar have mentioned, but your SQLite database schema is older than the installed n8n version so migrations fail because expected columns missing; either delete existing ~/.n8n/database.sqlite to start fresh or downgrade/install matching older n8n versions to run migrations sequentially or better switch to a proper Postgres database to avoid this. Hope this helps!
1 Like