Skip to content

"Column not found" or "no such table" after an update

Some releases add database tables or columns. An error about a missing column or table means those changes have not been applied yet.

Apply the pending migrations

  1. See what is waiting:
BASH
bin/plugin kahunacart migrate --status
  1. Apply it:
BASH
bin/plugin kahunacart migrate

bin/plugin kahunacart status also says when migrations are pending, and so does the Migrations check on KahunaCart → Operations → Health.

Why it did not happen on its own

Stores on SQLite apply migrations automatically by default. Stores on MySQL or PostgreSQL do not, so you decide when the schema of a busy database changes. Run bin/plugin kahunacart migrate after every update, or make it a step in your deploy.

Caution

Migrations cannot be undone. Take a backup before updating a store with real orders in it.

A migration seems stuck

A migration run that crashed leaves a lock behind for ten minutes. Wait for it to expire, then run bin/plugin kahunacart migrate again. It picks up where it left off.

More detail

Was this helpful?

More in Troubleshooting

See all in Troubleshooting