CSV importer: boolean and ap variants/typos

- add AP aliases for:
  - Design & politique du multiple → DPM,
  - Pratiques artistiques & complexité scientifique → PACS,
  - Narraion Speculative typo → NS
- Fix: OUI/NON CSV artefacts in contact_interne — clean DB, guard in findOrCreateAuthor and CSV import
- Cleaned 141 authors.email = 'NON' rows → NULL in dev DB
- findOrCreateAuthor: treat OUI/NON as null (CSV boolean artefact in email column)
- CSV import: sanitize contact column — OUI/NON → empty string before passing to findOrCreateAuthor
This commit is contained in:
Pontoporeia
2026-05-10 03:33:27 +02:00
parent fa30aab368
commit 96fa8ee266
7 changed files with 195 additions and 16 deletions

View File

@@ -88,9 +88,9 @@ CREATE TABLE IF NOT EXISTS languages (
);
INSERT OR IGNORE INTO languages (name) VALUES
('Français'),
('Anglais'),
('Néerlandais');
('français'),
('anglais'),
('néerlandais');
-- Format types (can select multiple)
CREATE TABLE IF NOT EXISTS format_types (
@@ -525,7 +525,7 @@ SELECT
GROUP_CONCAT(DISTINCT CASE WHEN ts.role = 'promoteur' AND ts.is_ulb = 1 THEN s.name END) as jury_promoteurs_ulb,
GROUP_CONCAT(DISTINCT CASE WHEN ts.role = 'lecteur' AND ts.is_external = 0 THEN s.name END) as jury_lecteurs_internes,
GROUP_CONCAT(DISTINCT CASE WHEN ts.role = 'lecteur' AND ts.is_external = 1 THEN s.name END) as jury_lecteurs_externes,
GROUP_CONCAT(DISTINCT l.name) as languages,
GROUP_CONCAT(DISTINCT UPPER(SUBSTR(l.name,1,1)) || SUBSTR(l.name,2)) as languages,
GROUP_CONCAT(DISTINCT fmt.name) as formats,
GROUP_CONCAT(DISTINCT tg.name) as keywords,
-- First author's email and contact-visibility flag