Landtag lists: match existing persons by birth date, Landtag membership and name variants

- person_by_name rules out homonyms born on another day and prefers the one who sat in
  that Landtag; failing an exact name, accepts a unique variant among that Landtag's
  members (Rudi/Rudolf, Chiara-Sophia/Chiara, new double surnames)
- normalize() maps ß to ss like SQL unaccent(); migration 0008 aligns stored aliases
- clean_name drops image captions, parenthesised suffixes, LTP, other abbreviations
  and zero-width characters

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
simonandClaude Opus 5.5 committed 2026-11-17 22:50:18 +01:00
1 parent faf9572b9f
commit 68be25a953
10 files changed
+114 -13

No files matched your search

@@ -0,0 +1,7 @@
-- normalize() now maps ß to ss, as SQL unaccent() does, so 'Stroißnig' and 'Stroissnig' are one alias.
-- Bring stored aliases in line (dropping those that would collide with an existing ss spelling).
DELETE FROM alias a
WHERE a.alias_norm LIKE '%%ß%%'
AND EXISTS (SELECT 1 FROM alias b WHERE b.entity_type = a.entity_type AND b.entity_id = a.entity_id
AND b.alias_norm = replace(a.alias_norm, 'ß', 'ss'));
UPDATE alias SET alias_norm = replace(alias_norm, 'ß', 'ss') WHERE alias_norm LIKE '%%ß%%';