-- Transform apropos data: each row has a label/role and an entries[] of {text, url}.
-- Contacts also include email per entry.

UPDATE apropos_contents SET value = '
[
  {
    "label": "Design & développement",
    "entries": [
      {"text": "Olivia Marly", "url": ""},
      {"text": "Théophile Gerveau-Mercie", "url": ""},
      {"text": "Théo Hennequin", "url": ""}
    ]
  },
  {
    "label": "Typographies",
    "entries": [
      {"text": "Ductus (Amélie Dumont)", "url": ""},
      {"text": "BBB DM Sans", "url": ""}
    ]
  }
]' WHERE key = 'credits';

UPDATE apropos_contents SET value = '
[
  {
    "role": "Bibliothèque d''architecture, d''ingénierie architecturale, d''urbanisme (BAIU) :",
    "entries": [
      {"text": "Laurent Leprince", "url": "", "email": "laurent.leprince@uclouvain.be"}
    ]
  },
  {
    "role": "Responsable des mémoires de l''ERG :",
    "entries": [
      {"text": "Xavier Gorgol", "url": "", "email": "xavier.gorgol@erg.be"}
    ]
  },
  {
    "role": "Cours de suivi de mémoire :",
    "entries": [
      {"text": "Brigitte Ledune", "url": "", "email": "brigitte.ledune@erg.be"}
    ]
  }
]' WHERE key = 'contacts';

-- Remove erg_url from the table (hardcoded in template now)
DELETE FROM apropos_contents WHERE key = 'erg_url';
