Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix the example code for onConflict with upsert

Andrew Smithb5cd623f2d11
diff --git a/spec/supabase_js_v2.yml b/spec/supabase_js_v2.yml
index a542b2e5109..1e06be20dbf 100644
--- a/spec/supabase_js_v2.yml
+++ b/spec/supabase_js_v2.yml
@@ -1564,7 +1564,7 @@ functions:
```ts
const { data, error } = await supabase
.from('users')
- .upsert({ id: 42, handle: 'saoirse', display_name: 'Saoirse' })
+ .upsert({ id: 42, handle: 'saoirse', display_name: 'Saoirse' }, { onConflict: 'id' })
.select()
```
data: