Short answer
The error details show the failing row, and supabase-js returns code 23514. Run the query below with the constraint name from the error to see the rule. Then send a value that passes it, watching for case and spaces, or change the rule in a migration if the app now needs new values. Adding a new check fails when old rows break it, so fix those rows first.
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 value is refused, and the fix
01
The value isn’t one the rule allows
“It allows you to specify that the value in a certain column must satisfy a Boolean (truth-value) expression.” PostgreSQL docs, Constraints (check)
A check rule is a true or false test on the row. Look it up by the name in the error, and the definition shows exactly which values pass.
select conrelid::regclass as table_name, conname, pg_get_constraintdef(oid) from pg_constraint where conname = 'orders_status_check';02
Case or spaces don’t match
A rule like status in ('open', 'closed') refuses Open and 'open '. Send the exact value, for example from a fixed list in the app rather than free text.
03
The app needs a new allowed value
Change the rule in a migration. Drop the old constraint and add the new one in the same statement.
alter table public.orders drop constraint orders_status_check, add constraint orders_status_check check (status in ('open', 'paid', 'refunded', 'closed'));04
Adding the check fails on old rows
“Normally, this form will cause a scan of the table to verify that all existing rows in the table satisfy the new constraint.” PostgreSQL docs, ALTER TABLE
Postgres checks every existing row when you add the constraint. Fix the rows that break it, or add it as NOT VALID, clean up, then run VALIDATE CONSTRAINT.
05
A check doesn’t stop empty values
“It should be noted that a check constraint is satisfied if the check expression evaluates to true or the null value.” PostgreSQL docs, Constraints (check)
A null passes most checks. If the column must have a value, add NOT NULL as well.
Checked against the vendor’s docs on : PostgreSQL docs: Constraints (check); PostgreSQL docs: ALTER TABLE.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.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.See scope and start
“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
Related: Supabase value too long for character varying · Supabase violates not-null constraint · Supabase violates foreign key constraint · Supabase duplicate key violates unique constraint