feat: PersonNameParser enhancements and Person model refactor (#209-#213) #215

Merged
marcel merged 25 commits from feat/issues-209-213-person-parser-enhancements into main 2026-04-08 18:48:00 +02:00
Showing only changes of commit 92f1a112f5 - Show all commits

View File

@@ -0,0 +1,12 @@
-- Add title column for honorifics/salutations (Dr., Tante, Frau, etc.)
ALTER TABLE persons ADD COLUMN title VARCHAR(50);
-- Add person_type column to distinguish persons from institutions/groups.
-- SKIP is intentionally omitted: it exists in the Java enum for parse-time
-- filtering but must never be persisted. The CHECK constraint enforces this.
ALTER TABLE persons ADD COLUMN person_type VARCHAR(20) NOT NULL DEFAULT 'PERSON';
ALTER TABLE persons ADD CONSTRAINT chk_person_type
CHECK (person_type IN ('PERSON', 'INSTITUTION', 'GROUP', 'UNKNOWN'));
-- Make first_name nullable for non-person entities (institutions, groups)
ALTER TABLE persons ALTER COLUMN first_name DROP NOT NULL;