Add FeWo Docker deployment and expand report themes

This commit is contained in:
2026-06-26 08:37:19 +00:00
parent 61a53e723e
commit 3a2f03d02e
7 changed files with 343 additions and 1 deletions
+27
View File
@@ -0,0 +1,27 @@
BEGIN;
ALTER TABLE public.report_customer_config
ALTER COLUMN theme TYPE VARCHAR(40);
ALTER TABLE public.report_customer_config
DROP CONSTRAINT IF EXISTS report_customer_config_theme_check;
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1
FROM pg_constraint
WHERE conname = 'report_customer_config_theme_not_empty'
AND conrelid = 'public.report_customer_config'::regclass
) THEN
ALTER TABLE public.report_customer_config
ADD CONSTRAINT report_customer_config_theme_not_empty
CHECK (length(trim(theme)) > 0) NOT VALID;
END IF;
END;
$$;
ALTER TABLE public.report_customer_config
VALIDATE CONSTRAINT report_customer_config_theme_not_empty;
COMMIT;
+2 -1
View File
@@ -6,7 +6,8 @@ CREATE TABLE IF NOT EXISTS report_customer_config (
contact_line VARCHAR(180) NOT NULL DEFAULT '',
logo_data_uri TEXT,
logo_text VARCHAR(5) NOT NULL,
theme VARCHAR(20) NOT NULL DEFAULT 'modern' CHECK (theme IN ('modern', 'classic')),
theme VARCHAR(40) NOT NULL DEFAULT 'modern'
CHECK (length(trim(theme)) > 0),
primary_color CHAR(7) NOT NULL DEFAULT '#1F5D66',
secondary_color CHAR(7) NOT NULL DEFAULT '#2C7C82',
accent_color CHAR(7) NOT NULL DEFAULT '#DBA25D',