Supabase PGRST205: “Could not find the table … in the schema cache”
Last verified: October 18, 2026
Could not find the table 'public.todos' in the schema cache (PGRST205)
What it means
The Supabase API (PostgREST) doesn't know about the table your app is querying. Usually the table was never created because the AI wrote a migration that didn't run, the name or schema is different (Todos vs todos, or a non-public schema), or the table was just created and the API's schema cache hasn't reloaded yet.
How to fix it
- Open Table Editor and confirm the table exists in the
publicschema with exactly the name in the error. - If it's missing, run the migration SQL in the SQL Editor (or ask Lovable to re-apply it), then check again.
- If it exists but the error persists, reload the API schema cache: run
NOTIFY pgrst, 'reload schema';in the SQL Editor. - If the error suggests a similar name (“Perhaps you meant…”), fix the table name in the code instead.
If your Lovable project uses Lovable Cloud instead of your own Supabase project, the same database lives under More → Cloud → Database. Its RLS view is read-only, so ask Lovable in chat (Plan mode) to make the policy change.
Stop the loop: paste these into Lovable
1. Diagnose first
Stop editing and don't retry earlier fixes. Supabase returns PGRST205: Could not find the table 'public.todos' in the schema cache. Without changing anything, list the tables that actually exist in the public schema, show the exact table name and schema the failing query uses, and tell me if a migration for this table exists but wasn't applied. State the cause in one sentence and propose ONE minimal change.
2. Then the one fix
Apply only the matching fix: if the table doesn't exist, apply the migration that creates it (with RLS enabled and policies scoped to auth.uid()). If the name or schema in the code is wrong, correct that one query. If the table exists and names match, run NOTIFY pgrst, 'reload schema'; in the SQL editor. Don't rename existing tables or drop data. Then reload the app and confirm the query works. Tell me exactly what you ran or changed.
3. Save this rule so it stays fixed
Lovable: Project settings → Knowledge. Cursor: .cursor/rules or .cursorrules. Bolt: Project settings → Knowledge. Replit: replit.md.
Rule: Every new table must be created by a migration that is actually applied, in the public schema, with lowercase snake_case names, RLS enabled and policies added in the same migration. After creating a table, confirm it exists in Table Editor before writing code that queries it.
FAQ
Is my data gone?
Usually not. This error is about the API not finding the table name, most often because it was never created or is spelled differently.
Do I need to restart Supabase?
No. NOTIFY pgrst, 'reload schema'; reloads the API's view of your tables.
Sources
Your error is a bit different? Paste it with what you already tried and get a diagnose-first prompt, one fix and a rule for your exact case.
Break the loop — 3 free fixes Still stuck? Get a human fix