Files
company-tool/backend/company-migrations/0003_customer_details.sql
Torsten Schulz (local) 0e539710c0 feat: Add password reset functionality with request and reset forms
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
2026-06-02 15:28:38 +02:00

46 lines
1.4 KiB
SQL

-- Additional encrypted customer fields for organization schemas.
alter table {schema}.customers
add column if not exists details_ciphertext bytea,
add column if not exists details_nonce bytea,
add column if not exists details_key_id text;
alter table {schema}.customers
drop constraint if exists customers_details_encryption_complete;
alter table {schema}.customers
add constraint customers_details_encryption_complete check (
(
details_ciphertext is null
and details_nonce is null
and details_key_id is null
)
or (
details_ciphertext is not null
and details_nonce is not null
and details_key_id is not null
)
);
alter table {schema}.suppliers
add column if not exists details_ciphertext bytea,
add column if not exists details_nonce bytea,
add column if not exists details_key_id text;
alter table {schema}.suppliers
drop constraint if exists suppliers_details_encryption_complete;
alter table {schema}.suppliers
add constraint suppliers_details_encryption_complete check (
(
details_ciphertext is null
and details_nonce is null
and details_key_id is null
)
or (
details_ciphertext is not null
and details_nonce is not null
and details_key_id is not null
)
);