What is the proper way to update a value after update or insert? - Supabase