b2share icon indicating copy to clipboard operation
b2share copied to clipboard

API: Record metadata migration from one schema version to another.

Open nharraud opened this issue 7 years ago • 1 comments

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.

nharraud avatar Jan 09 '18 13:01 nharraud

@hjhsalo As said IRL you could start with this issue.

nharraud avatar Mar 16 '18 14:03 nharraud