Über Open CoDE Software Wiki Diskussionen GitLab

Skip to content

Generate XDF from database state

Felix Bernhardt requested to merge 726-generate-xdf into main

Related to #726

Database schema

  • Safe relation (self-references) for several resources:
    • dokumensteckbrief_relation
    • schema_relation
    • datenfeldgruppe_relation
    • datenfeld_relation
  • Add several legacy-columns with mutable data, that is only relevant for xdf2-Regeln

database.py

  • Combine all necessary operations regarding relations and references to Regeln for Datenschemata, Gruppen, Felder and Regeln into one create_XXXXXX and one update_XXXXXX command respetively for each resource.
  • Update the save_steckbrief command to also handle all necessary updates to relations
  • Remove unused old queries that where only necessary before when creating a new Datenschema, Gruppe or Feld.

Tests

  • Create one simple test for xdf2 and xdf3 respectively to validate the xdf export:
    • (1) Create a full schema message with all possible values filled
    • (2) Save to the database
    • (3) Reconstruct the message from the database, and assert that the result is identical to the source
Edited by Felix Bernhardt

Merge request reports

Loading