SupabaseS
Supabase4y ago
sebx

data is NOT updating

I'm loosing my mind trying to debug this -- I'm not convinced it's not an issue with my code but I've been at testing every piece for hours and hours now....

It seems like my boolean data is not updating --- UNLESS it is only one field at a time that I'm updating......
Whaaaat.

Also, to make it worse: the result i get back from a supabase client query AFTER updating a row is correct -- but it doesn't actually save in the database.

The code looks regular:
  const {data} = await supabaseClient.from("subscriptions")
    .update({...subscriptionData}) // includes {"isSubscribed": true}
    .match({subscriberId: sub.userId})
    .select('subscriberId,isSubscribed')

  console.log(data) 
// {"subscriberId": 4926568, "isSubscribed": true}


BUT sql editor on dashboard returns isSubscribed: false

I also tried using prisma, same problem. Doesn't save the updates....
Was this page helpful?