eee0885811
- Remove recursive directory size calculations (single Seafile API call per list) - Remove 'Used in this location' usage display - Fix move using v2 per-type endpoints instead of broken batch endpoint - Send entry type from frontend for correct move routing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
1.3 KiB
SQL
23 lines
1.3 KiB
SQL
alter table public.expenses
|
|
add column if not exists receipt_path text,
|
|
add column if not exists receipt_name text;
|
|
|
|
insert into storage.buckets (id, name, public)
|
|
values ('expense-receipts', 'expense-receipts', false)
|
|
on conflict (id) do nothing;
|
|
|
|
drop policy if exists "Team reads expense receipts storage" on storage.objects;
|
|
drop policy if exists "Team inserts expense receipts storage" on storage.objects;
|
|
drop policy if exists "Team updates expense receipts storage" on storage.objects;
|
|
drop policy if exists "Team deletes expense receipts storage" on storage.objects;
|
|
|
|
create policy "Team reads expense receipts storage" on storage.objects
|
|
for select to authenticated using (bucket_id = 'expense-receipts' and get_my_role() = 'team');
|
|
create policy "Team inserts expense receipts storage" on storage.objects
|
|
for insert to authenticated with check (bucket_id = 'expense-receipts' and get_my_role() = 'team');
|
|
create policy "Team updates expense receipts storage" on storage.objects
|
|
for update to authenticated using (bucket_id = 'expense-receipts' and get_my_role() = 'team')
|
|
with check (bucket_id = 'expense-receipts' and get_my_role() = 'team');
|
|
create policy "Team deletes expense receipts storage" on storage.objects
|
|
for delete to authenticated using (bucket_id = 'expense-receipts' and get_my_role() = 'team');
|