Create migration helper
From 0.x to 1.x:
General
- set
id
fromuuid
- remove
uuid
- set
_created
and_updated
as integers fromcreated
andupdated
as milliseconds (UTC) - remove iso datetime formatted
created
andupdated
Selector
- extract old selector
value
- set
value
to qs encoded pairs, e.g.date-time:t=OLD_VALUE_ENCODED
- set
conformsTo
toMedia
- set
type
toFragmentSelector
MoSys Cells
- extract body from cell annotations
- create
Cell
datatype object usingcontent
,id
andsourceUuid
withindata
property, all other (non-positional) props move toconfig
- create
Annotation
objects usingxywh
(2DArea) selectors and set them from original cell body'sx
,y
,width
andheight
props, forbody
usepurpose
=linking
andtype
=Cell
, then reference previously createdCell
object'sid
inbody.source
Additional
- for videos, extract title (if not existing as annotation already) and create annotation for it
- for videos, extract duration and store in selector.value