Fix · Supabase and databases
null value in column violates not-null constraint (23502)
What you may see
- An insert fails because a required value is empty
Most likely cause
The table requires a value in a column and the form or code sent nothing for it.
Check first (about two minutes)
- Read the column name in the message.
The fix prompt
What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.
Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.
Prompt language
Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.
After you tried it, did it work?
Steps
- Find where that column should be filled (form field, default value, server code).
- Choose with me: require it in the form, give the column a sensible default, or allow empty if it is truly optional.
Do not do this
- Do not fill it with fake values.
- Do not make required columns optional without telling me why.