sum
This commit is contained in:
19
supabase/migrations/005_quick_add.sql
Normal file
19
supabase/migrations/005_quick_add.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- Quick-add items table
|
||||
create table quick_add_items (
|
||||
id uuid primary key default gen_random_uuid(),
|
||||
user_id uuid not null references auth.users(id) on delete cascade,
|
||||
name text not null,
|
||||
icon text,
|
||||
sort_order int not null default 0,
|
||||
created_at timestamptz not null default now(),
|
||||
updated_at timestamptz not null default now()
|
||||
);
|
||||
|
||||
create index quick_add_items_user_id_idx on quick_add_items(user_id);
|
||||
|
||||
alter table quick_add_items enable row level security;
|
||||
|
||||
create policy "Users can CRUD own quick-add items"
|
||||
on quick_add_items for all
|
||||
using (user_id = auth.uid())
|
||||
with check (user_id = auth.uid());
|
||||
Reference in New Issue
Block a user