The database doesn't have that table or column
What is this error?
Your query named something the database has never heard of. Your code and your schema have drifted apart.
Common Causes
- A migration was written but never applied to this environment.
- You're pointed at the wrong database (dev vs production).
- The name is misspelled or the wrong case.
- The table exists in a different schema than the one being searched.
How to fix it (Check First)
- 1List the tables in the database you are actually connected to.
- 2Compare the connection string / project ref with the one you think you're using.
- 3Check whether migrations ran during the last deploy.
What NOT to do
- Do not create the table by hand in production and skip the migration — the drift gets worse.
Technical Details
Unquoted identifiers in Postgres fold to lowercase; a quoted "CamelCase" table only matches when quoted identically. Schema search_path also affects resolution.