How to fix "insert into "orders" ("charge_total", "complaint", "created_at", "credits_given", "gift", "id", "refund_total", "status", "stripe_charge_id", "updated_at", "user_id") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) returning * - null va"

insert into "orders" ("charge_total", "complaint", "created_at", "credits_given", "gift", "id", "refund_total", "status", "stripe_charge_id", "updated_at", "user_id") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) returning * - null value in column "id" violates not-null constraint

pls can u help me

@teerasuk122 Welcome to the forum!
Can you post the original query as it is in Retool in addition to some more screenshots....Seems that the value you are trying to pass as "id" is null and the db is complaining.

1 Like