← All errors · SupabaseSupabase database & RLS errors
relation "public.x" does not exist
Exact error
relation "public.profiles" does not exist
What it means
Postgres can't find the table or view. Error code 42P01.
Likely causes
- The migration that creates the table was never run on this project.
- Typo or case mismatch (tables created with quotes like "Profiles" are case-sensitive).
- Table lives in a different schema.
How to fix it
Check Table Editor or run:
select table_schema, table_name from information_schema.tables where table_name ilike '%profile%';Apply pending migrations with the Supabase CLI:
supabase db pushUse lowercase, unquoted table names to avoid case issues.
Prevent this next time
- Keep schema and RLS policies in migrations (`supabase migration new`) instead of editing production by hand.
- Test each policy as both an anonymous and a signed-in user before shipping.
FAQ
What does "relation "public.x" does not exist" mean?
Postgres can't find the table or view. Error code 42P01.
What usually causes it?
The migration that creates the table was never run on this project. Typo or case mismatch (tables created with quotes like "Profiles" are case-sensitive). Table lives in a different schema.
How do I fix it?
1. Check Table Editor or run: 2. Apply pending migrations with the Supabase CLI: 3. Use lowercase, unquoted table names to avoid case issues.
Related errors
Get new fixes weekly
No spam. Unsubscribe anytime. Privacy