Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All locationable objects are also versionable.  This means there can be multiple version of the same file(s).  When an old entity with multiple versions is changed to a new type, each version will be converted the same way as the current version.  If any version of an entity cannot be changed then the change will fail (leaving the entity in its original state).  The failure report will indicate exactly what went wrong.  Since versions of an entity are not editable, the only way to "fix" an old entity with in incompatible version will be to delete the incompatible version.  Once all incompatible version are delete, another attempt can be made to convert the type.

 

Entity Query

Entity aliases can be used in the "from" clause of the entity query services (see: Table 1. "alias(es)").  For example, "select * from dataset" would list all Studies that a user can see.  After an old entity's type has changed, it will not longer appear in query results that filter by its old type alias.  Instead, changed types will show up only under the new type alias.  For example, a Data object will currently be listed with "select * from layer", if the data object is converted to a file, it will then be listed using "select * from file".  The type change should have no other effects on entity query.   Any deprecated entity field can still be used to filter entity query results even though the property values will be moved to annotations upon a type change.  The entity query services already treats entity fields and annotations the same.

Migration plan

  1. Once the new entity conversion service is in place, we will setup a script to to call it for every old entity on staging.  The script will record all entities that file to convert for any reason.  The normal migration process will "undo" all type changes on staging.
  2. We will need to work with the original entity owners to find fixes for all entities that cannot be changed.  We will also need the original owners to review the type changes on staging and confirm the migration went as expected.
  3. For all successful type conversions on staging we can repeat the conversion on production (making the type change permanent).
  4. Repeat steps 1-3 until all old types are converted.

...