Using upsert when `Notifications` table doesn't exist yet for user
I have a query to update a users notification preferences, but there's no data existing data yet inside the table. How can I change the query to accodomate that?
I assume
upsert
is what needs to be used?
For reference here is my Notifications
model
1 Reply
It seems this is the way to create if it doesn't exist yet
but
userId
is not defined in create