Vidispine has support for migrating metadata to adhere to a new structure. For example, you might have changed the group hierarchies in your metadata schema, and want to migrate old items and collections to the new schema. This is done by posting a migration definition. Vidispine will then automatically go through all the metadata in the system and migrate it.
There are a number of operations available for metadata migrations:
- Move This is used to move a field or a group from one position in the hierarchy to another.
- Rename This can be used to rename fields. Note that the new name must already be defined as a metadata field in the system, and the data types of the old and new fields must be compatible (e.g. a string field cannot be renamed to a date field, since it could cause invalid values to be introduced)
- Delete Used to delete a field or a group from a metadata hierarchy.
Migrations are defined using XML (or JSON). Here is an example of a migration containing all of the above operations:
<MetadataSchemaMigrationDocument xmlns="http://xml.vidispine.com/schema/vidispine"> <move type="field"> <from> <group> <name>Film</name> <field> <name>actor</name> </field> </group> </from> <to> <group> <name>Film</name> <group> <name>Personnel</name> </group> </group> </to> </move> <rename> <from> <group> <name>Film</name> <field> <name>internal_title</name> </field> </group> </from> <to>production_id</to> </rename> <delete type="group"> <target> <group> <name>Film</name> <group> <name>Soundtrack</name> </group> </group> </target> </delete> </MetadataSchemaMigrationDocument>
The above migration would perform three operations:
- A move operation on any actor field that is located in the Timespan > Film group. It would instead be placed in Timespan > Film > Personnel group.
- A rename operation. It would rename any internal_title field located in the Timespan > Film group. It would rename it to production_id.
- A delete operation which would delete any group matching Timespan -> Film -> Soundtrack.