SupabaseS
Supabase2y ago
DanM

Set a column to null on update

Using supabase js how to I set a column to null when running an update. I tried the following and none worked.

subabase.from("address").update({"user_id", null}).eq("id", id)
subabase.from("address").update({"user_id", undefined}).eq("id", id)

The request complete successully but there in no change in the table. I believe this is due to update stripping out undefined and null props on update but I'm not sure. Any ideas how I do this.

Thanks
Was this page helpful?