b2share
b2share copied to clipboard
API: Record metadata migration from one schema version to another.
Problem: New community schemas can create complex migration when a field is deprecated (forbidden) or even replaced by other fields. B2SHARE needs a mechanism enabling users to migrate a record to it's community last schema version.
Possible Solutions: Records could be migrated two ways:
- via UI: This is quite complex as the UI uses the schema to display the fields. as the new schema is not compatible with the old data the UI cannot display it. We could discard some data and/or have a side by side view.
- via REST API: we can then suppose that the script knows how to transform the metadata in order to make it valid with the new schema. A simple solution is then to let the external script set the
$schema
field of a record. B2SHARE would just check that this schema is the last version of the same community's schema.
Chosen solution:
We will go for now for the simple REST API solution: allow the modification of the $schema
field as long as it is the last version of the same community's schema.
@hjhsalo As said IRL you could start with this issue.