Fix guides / Supabase: "Could not find the table in the schema cache"

How to fix Supabase "Could not find the table ... in the schema cache"

Your app calls supabase.from('orders') and gets Could not find the table 'public.orders' in the schema cache (PGRST205), or Could not find the 'status' column of 'orders' in the schema cache (PGRST204). The code looks right, so what is missing?

Why it happens

  • The migration never ran on this project. Your AI builder wrote the SQL, but it was applied to a different project, or not at all. Very common after switching Supabase projects or connecting a new one in Lovable or Bolt.
  • Name mismatch. The table is Orders or order, or lives in another schema than public.
  • Stale API cache. The table exists, but the Data API has not reloaded its schema yet.
  • The schema is not exposed. Tables in a custom schema are invisible until that schema is added under the API settings.

Fix 1: confirm the table really exists in this project

Check the project URL in your env vars matches the project open in the dashboard. Then run:

select table_schema, table_name
from information_schema.tables
where table_name ilike '%order%';

If nothing comes back, run the missing migration in the SQL editor (your builder usually keeps it in supabase/migrations).

Fix 2: reload the schema cache

notify pgrst, 'reload schema';

Fix 3: match the exact name and schema

Postgres folds unquoted names to lowercase. If the table was created as "Orders", rename it: alter table "Orders" rename to orders;. For another schema, use supabase.schema('app').from('orders') and add that schema to the exposed schemas list.

Fix 4: if it then says permission denied

Newer projects require explicit grants on new tables. See the 42501 permission denied guide.

Check the fix

  1. The table shows in the Table Editor of the same project your app points at.
  2. The request in the browser Network tab returns 200.
Still stuck? No shame in it: these bugs hide in places your AI builder cannot see. Send me the error and your repo and I will fix it as a pull request within 24 hours, explained in plain English, for $49. Several things broken? The $149 Full Rescue covers up to 3 issues plus a security pass, within 72 hours. Not fixed means full refund.
Quick Fix, $49Full Rescue, $149Ask first

Last updated 2026-10-21.