From 0a53dc4230181658bb47279945e82797e953770c Mon Sep 17 00:00:00 2001 From: Lennard Strohmeyer <lennard.strohmeyer@digitallearning.gmbh> Date: Fri, 21 Mar 2025 12:50:34 +0100 Subject: [PATCH] updated documentation - cleared up how to migrate an old provider schema --- docs/docs/provider_schema.md | 52 +++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/docs/docs/provider_schema.md b/docs/docs/provider_schema.md index 9813f75..f294d7b 100644 --- a/docs/docs/provider_schema.md +++ b/docs/docs/provider_schema.md @@ -299,4 +299,54 @@ You have the option to retain the existing schema, translate specific properties } -``` \ No newline at end of file +``` + + +### Migrating from an older version prior to 1.0.1 + +Before version 1.0.1, provider schemas included definitions for verb groups, which in turn included the available verbs and objects. +Also, user consent creation was not tied to groups but instead to individual verbs. + +A high-level example of an old schema might look like this: +```json +{ + "id": "moodle-0", + "name": "Moodle", + "description": "Open-source learning management system", + "groups": [ + { + "id": "default_group", + "label": "Default group", + "description": "default", + "showVerbDetails": true, + "purposeOfCollection": "Lorem Ipsum", + "verbs": [ + ... + ] + } + ], + "essentialVerbs": [] +} +``` + +To correct an old schema by hand, one would have to extract all verbs from their respective groups and add them to a global "verbs" key in the schema, removing the old "groups" key. +Essential verbs have kept their structure, but you will have to make sure that the additionalLrs key exists. + +The resulting schema would thus have this structure: +```json +{ + "id": "moodle-0", + "name": "Moodle", + "description": "Open-source learning management system", + "verbs": [ + ... + ], + "essentialVerbs": [], + "additionalLrs": [] +} +``` + +After uploading the updated schema, the groups have to be created manually. + + +To automate this process, one could upload the old provider schema in an older version of polaris (pre-1.0.1) and then run all the remaining migrations including `providers/migrations/0008_verb_remove_providerschema_essential_verbs_and_more.py`. \ No newline at end of file -- GitLab