These examples demonstrate how to run basic CRUD operations on a table in a Supabase database using Trigger.dev.
@supabase/supabase-js
libraryinsert
user_subscriptions
.user_subscriptions
table, create a new column:
user_id
, with the data type: text
user_subscriptions
table with the user_id
set to user_12345
.
@supabase/supabase-js
libraryinsert
update
user_subscriptions
(if you haven’t already)
user_subscriptions
table, create these columns (if they don’t already exist):
user_id
, with the data type: text
plan
, with the data type: text
updated_at
, with the data type: timestamptz
user_subscriptions
table with the user_id
set to user_12345
, the plan
set to pro
, and the updated_at
timestamp updated to the current time.