feat: Implement price list import feature with preview and apply options feat: Create price rules management page with CRUD operations feat: Develop quotes management page with itemized quotes and status tracking feat: Introduce organization registration page for new users feat: Build suppliers management page with detailed supplier information feat: Create users management page for inviting and managing roles chore: Add TypeScript configuration for improved type checking chore: Set up Vite configuration for development server and API proxy chore: Add Vite environment type definitions for better TypeScript support
20 lines
803 B
SQL
20 lines
803 B
SQL
-- Template migration for each organization schema.
|
|
-- Replace {schema} with the real schema name, e.g. company_<organization_id>.
|
|
|
|
alter table {schema}.outgoing_invoices
|
|
add column if not exists source_quote_id uuid references {schema}.quotes(id);
|
|
|
|
alter table {schema}.outgoing_invoices
|
|
add column if not exists customer_discount_percent numeric(7, 4) not null default 0;
|
|
|
|
alter table {schema}.outgoing_invoices
|
|
drop constraint if exists outgoing_invoices_customer_discount_valid;
|
|
|
|
alter table {schema}.outgoing_invoices
|
|
add constraint outgoing_invoices_customer_discount_valid check (
|
|
customer_discount_percent >= 0 and customer_discount_percent <= 100
|
|
);
|
|
|
|
create index if not exists idx_outgoing_invoices_source_quote
|
|
on {schema}.outgoing_invoices (source_quote_id);
|