Skip to content

Supabase API errorSupabase: “Could not find the column in the schema cache” (PGRST204)

PGRST204 is the Supabase API error, status 400, for a column the API can’t find on the table. Common causes are a name that differs from the database, such as userId for user_id, a migration that didn’t run on this project, or a stale schema cache.

Short answer

Read the column name in the error and compare it with the table in the Table Editor. Rename the field in your code, or add the column with a migration on the project your app uses. If the column exists, reload the schema cache with NOTIFY pgrst, then retry.

Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.

Why the API can’t see the column, and the fix

  1. 01

    The code uses a different name

    “Caused when the column specified in the columns query parameter is not found.” Supabase docs, PostgREST error codes (PGRST204)

    Postgres names are usually snake_case, while JavaScript objects use camelCase. Inserting { userId } into a table with user_id fails. Map the names before you insert or update.

    await supabase.from('orders').insert({
      user_id: user.id, // not userId
      total_cents: totalCents,
    });
  2. 02

    The object has extra fields

    Spreading a whole form or API object into insert() sends fields the table doesn’t have, such as confirmPassword or id from another table. Pick only the columns you need.

  3. 03

    The migration didn’t run on this project

    A column added locally or in staging doesn’t exist in production until the migration runs there. Check the column in the project your app’s URL points at, and push the migration.

  4. 04

    The schema cache is stale

    “To refresh your PostgREST schema, go to your project Dashboard, and open the SQL Editor.” Supabase docs, Reload the PostgREST schema

    Less common: the API caches the database structure and may not yet see a column just added with SQL. Reload the cache from the SQL Editor.

    NOTIFY pgrst, 'reload schema';

Checked against the vendor’s docs on : Supabase docs: PostgREST error codes; Supabase docs: Reload the PostgREST schema.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
A buyer in the United States, July 2022. Shopify on Fiverr
All 127 Fiverr reviews

Related: Supabase could not find the table in the schema cache · Supabase could not find the function in the schema cache · Supabase migration failed (db push) · Supabase PGRST200

Questions

More on this error

Is a missing table the same error?

No. A missing table is PGRST205, with status 404. PGRST204 means the table exists but a column in the request doesn’t.

Why does it work locally but not in production?

Usually because the local database has the column and production doesn’t. Run the same migration on production, then reload the schema cache if needed.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.