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>
19 lines
843 B
SQL
19 lines
843 B
SQL
create table if not exists public.subcontractor_payments (
|
|
id uuid default gen_random_uuid() primary key,
|
|
profile_id uuid references public.profiles(id) on delete set null,
|
|
date date default current_date not null,
|
|
description text not null,
|
|
amount numeric(10,2) not null,
|
|
status text not null default 'pending' check (status in ('pending', 'paid')),
|
|
paid_at date,
|
|
notes text default '',
|
|
created_by uuid references public.profiles(id) on delete set null,
|
|
created_at timestamptz default now() not null
|
|
);
|
|
|
|
alter table public.subcontractor_payments enable row level security;
|
|
|
|
drop policy if exists "Team all subcontractor_payments" on public.subcontractor_payments;
|
|
create policy "Team all subcontractor_payments" on public.subcontractor_payments
|
|
for all using (get_my_role() = 'team') with check (get_my_role() = 'team');
|