acc_invoices: внутренние проекты (acc_internal_projects), описание, ссылка для оплаты, «Файла Invoice пока нет», строки необязательны, ждёт автор по умолчанию
All checks were successful
ci / test (push) Successful in 52s
ci / deploy (push) Successful in 3m5s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-04 15:30:38 +03:00
parent ade259515f
commit d0a22b8cec
9 changed files with 93 additions and 29 deletions

View File

@@ -0,0 +1,13 @@
-- acc_invoices: внутренние проекты (спецстроки вместо проекта QuickBooks), описание, ссылка для оплаты, «файла инвойса пока нет»
create table if not exists acc_internal_projects (
id uuid primary key default gen_random_uuid(),
name text not null unique,
sort int not null default 0
);
alter table acc_internal_projects enable row level security;
insert into acc_internal_projects (name, sort) values ('ИТ KHBuild', 1), ('KHBuild внутренние затраты', 2) on conflict (name) do nothing;
alter table acc_invoices add column if not exists internal_project_id uuid references acc_internal_projects (id);
alter table acc_invoices add column if not exists description text; -- описание текстом (что оплачивается)
alter table acc_invoices add column if not exists pay_link text; -- URL для оплаты (портал вендора и т. п.)
alter table acc_invoices add column if not exists no_invoice_file boolean not null default false; -- «Файла Invoice пока нет.»