Files
accounted/supabase/migrations/20260721162121_expand_invoice_font_support.sql
T
Mattsson e11f70b347 Bug/gh issues fiz (#1103)
* refactor: optimize page loading and data fetching

* fix: resolve recurring production runtime errors

* feat: add MCP company and customer updates

* fix: handle year-end tax adjustments

* feat: harden annual report compliance

* fix: expand invoice logo and font support

* fix: sanitize API route error responses

* fix: sanitize user-facing error messages

* feat: persist onboarding and tax assessment notices

* fix: reduce cloud backup audit churn

* feat: refine invoice editor layout

* fix: show saved tax adjustments in INK2

* fix: complete annual report API mappings

* docs: record operational safeguards and decisions

* fix: harden annual report review findings

* fix: adjust column span for description based on VAT registration

* New css class name
2026-07-21 23:00:15 +02:00

38 lines
1.1 KiB
SQL

-- Add bundled and company-uploaded invoice fonts. Custom font files live in a
-- dedicated private bucket. The server embeds each font into the generated PDF,
-- so customer font files never need public URLs.
ALTER TABLE public.company_settings
ADD COLUMN IF NOT EXISTS invoice_custom_font_path TEXT NULL,
ADD COLUMN IF NOT EXISTS invoice_custom_font_name TEXT NULL;
ALTER TABLE public.company_settings
DROP CONSTRAINT IF EXISTS company_settings_invoice_font_check;
ALTER TABLE public.company_settings
ADD CONSTRAINT company_settings_invoice_font_check
CHECK (
invoice_font_family IN (
'Helvetica',
'Times-Roman',
'Courier',
'Source Sans 3',
'Source Serif 4',
'Custom'
)
);
INSERT INTO storage.buckets (id, name, public, file_size_limit, allowed_mime_types)
VALUES (
'invoice-fonts',
'invoice-fonts',
false,
5242880,
ARRAY['font/ttf', 'font/woff']
)
ON CONFLICT (id) DO UPDATE
SET public = EXCLUDED.public,
file_size_limit = EXCLUDED.file_size_limit,
allowed_mime_types = EXCLUDED.allowed_mime_types;
NOTIFY pgrst, 'reload schema';