relation does not exist / Could not find the table in the schema cache
- Supabase
- Postgres
What it means
The database you are connected to has no table with that name. Most often it exists in your development database, but the change was never applied to production.
Why it happens
- The migration that creates the table ran locally but not on the live database.
- The app points at a different project than you think (check the URL in your settings).
- A typo or a different schema in the table name.
How to fix it
- Compare the migrations applied to development and production.
- Apply the missing migration to production through your normal migration process.
- Check the project URL in your production environment variables.
Let your AI find the cause
Paste this into Claude Code, Cursor, Lovable or whichever AI built your app. It looks first and changes nothing until you have read the answer.
My live app fails with 'relation does not exist' or 'Could not find the table in the schema cache'. Without changing anything yet, tell me which database each environment points at, which migration creates this table, and whether it has been applied to production.