466e55a015
* fix: reconcile annual reports with final closing entries * test: cover annual report depreciation and VAT balances * Merge remote-tracking branch 'origin/main' into fix/usr-fdbck-ch * fix: show exact invoice delivery details * fix: use currency account in invoice emails * fix: address invoice delivery review feedback * fix: harden invoice delivery and payment accounts * test: assert RLS-denied zero-row updates * fix: close remaining invoice compliance gaps * fix: harden invoice archive authorization * fix: close invoice delivery review findings * fix: verify delivery finalization results * fix: cap combined invoice email recipients * fix: close final invoice compliance findings * fix: prevent stale payment account saves * test: prove invoice delivery isolation * fix: close invoice privacy review findings * test: normalize delivery retention dates
16 lines
713 B
SQL
16 lines
713 B
SQL
-- Add the legacy SEK bank fields required by currency-specific invoice accounts.
|
|
|
|
ALTER TABLE public.company_settings
|
|
ADD COLUMN IF NOT EXISTS bank_name text,
|
|
ADD COLUMN IF NOT EXISTS clearing_number text,
|
|
ADD COLUMN IF NOT EXISTS account_number text;
|
|
|
|
COMMENT ON COLUMN public.company_settings.bank_name IS
|
|
'Legacy SEK invoice bank name mirrored from invoice_payment_accounts.SEK.';
|
|
COMMENT ON COLUMN public.company_settings.clearing_number IS
|
|
'Legacy SEK invoice clearing number mirrored from invoice_payment_accounts.SEK.';
|
|
COMMENT ON COLUMN public.company_settings.account_number IS
|
|
'Legacy SEK invoice account number mirrored from invoice_payment_accounts.SEK.';
|
|
|
|
NOTIFY pgrst, 'reload schema';
|