Generate XDF from database state
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
relation
s and references to Regeln for Datenschemata, Gruppen, Felder and Regeln into onecreate_XXXXXX
and oneupdate_XXXXXX
command respetively for each resource. - Update the
save_steckbrief
command to also handle all necessary updates torelation
s - 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