Closed oskarrough closed 3 years ago
How about "cascades" e.g. deleting relationships automatically?
user_channel where user_id = id
channel_track
We've proposed replacing channel.user_id
with the junction table user_channel
. That would make these policies invalid.
How would we update them?
create policy "User can insert their own channel."
on channels for insert
with check ( auth.uid() = user_id );
maybe?
create policy "User can insert their own channel."
on channels for insert
using (
auth.uid() in (
select user_id from user_channel where user_channel.user_id = auth.uid()
)
);
track is missing discogs url
Update sql/init.sql with the following.
All tables should have these fields
uuid
?)Tables to create
Junction tables to create