Migrating to version 0.3.0
Version 0.3.0 introduces : every node label and relation type has a schema with typed properties, rules, file settings, placement and indices, managed by the new /schema and /migration endpoints. Element ids and the backup format stay as they are, so an instance of version 0.2.x is migrated with a backup and a reset, without converting anything.
What changes for clients
- Type names: types which are created through the API after the update follow a casing rule: node labels are written in UpperCamelCase (
SavedSearch), relation types in SCREAMING_SNAKE_CASE (HAS_FILE), see . Type names also have to differ in more than their case. Types which exist already keep their names, so existing data and clients keep working. Clients which create types with other names have to be updated. - Timestamps: the properties
createdandupdatedof every element are namedcreatedAtandupdatedAt. - Reserved types:
Schema,SchemaRevision,Migration,defaultand the relation typesHAS_REVISIONandHAS_MIGRATIONare reserved, see reserved data . - Locked types: writes of elements answer with while the databases of their type are prepared for its schema. Clients should repeat such a request later.
- Expressions: Expr Lang can not be disabled anymore. Remove
expression.enabledfrom the , it is rejected.GET /instance-configurationno longer returns it. - Role assignments: the type of role assignments is
_RoleAssignment. answers with201 CreatedandLocation, without body. Tokens always returncapabilities.
Schemas of existing data
Schemas change little for existing instances, but note:
- Backups without schemas: which have no
schema/folder, e.g. those of version 0.2.x, are loaded withautoschemas for their types, i.e. without any validation, see . Define a stricter schema afterwards if you want one.createdandupdatedare renamed tocreatedAtandupdatedAtwhile the backup is loaded. - Data roles are named neutrally: the settings
storage,placement.rolesandplacement.searchof a schema name the data rolesgraph,documentandsearch, not the databasesneo4j,mongodbandelasticsearch. Overrides of indices (index) and raw indices keep the names of the databases, see . - Index names: the indices which schemas create are named
ens_<type>_<property>_<intent>_<hash>. The Neo4j id indices which the API manages itself are namedeni_<type>_<hash>instead ofember_nexus_<kind>_id_<type>_<hash>; old ones are still recognized, replaced byindex:ensureand dropped bydatabase:drop, so no manual step is needed.
Migrating an instance
- Create a backup with version 0.2.x, using . Stop all clients from writing to the instance afterwards.
- Update the API to version 0.3.0, then reset all databases using .
- Load the backup using . It creates the schemas of all types and renames the timestamps.
- Define the schemas you want, see defining a .
Backups of versions before 0.2.0 are converted first, see migrating to version .