← All errors · SupabaseSupabase database & RLS errors

relation "public.x" does not exist

Exact error

relation "public.profiles" does not exist

What it means

This often shows up in Lovable, Bolt, Cursor, and v0 apps when the generated client queries a table that was never created on this Supabase project, or was only created in local SQL and never applied. Postgres can't find the table or view. Error code 42P01.

See also: official Supabase guide: Resolving 42P01: relation does not exist error.

Likely causes

How to fix it

  1. Check Table Editor or run:

    select table_schema, table_name
    from information_schema.tables
    where table_name ilike '%profile%';
  2. Apply pending migrations with the Supabase CLI:

    supabase db push
  3. Use lowercase, unquoted table names to avoid case issues.

  4. If an AI tool wrote the query, paste this with the table name from your error:

    The app throws Postgres error 42P01: relation "public.profiles" does not exist (replace the table name with the one in my error). Check whether that table exists in this Supabase project, fix any typo or quoted-case name, and apply the missing migration or create the table. Do not invent a different table name.

Still stuck after trying this? Get it fixed for $49, or you don't pay.

Prevent this next time

FAQ

What does "relation "public.x" does not exist" mean?

This often shows up in Lovable, Bolt, Cursor, and v0 apps when the generated client queries a table that was never created on this Supabase project, or was only created in local SQL and never applied. 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. 4. If an AI tool wrote the query, paste this with the table name from your error:

Last checked against official docs on . Sources: Official Supabase Knowledge Base: Resolving 42P01: relation does not exist error.

Related errors

More Supabase errors and fixes →

Tools that help

  • Railway: Deploy backends and databases; new users get $20 credit.

Some links on this page are affiliate links: if you sign up or buy through them, FixStack may earn a commission at no extra cost to you. Learn more.

Get new fixes weekly

No spam. Unsubscribe anytime. Privacy