API version: 0.3.0

---

# Migrating to version 0.3.0

Version 0.3.0 introduces [schemas](/reference/schemas.md): 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
  [names](/reference/schemas.md#names). 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 `created` and `updated` of every element are named `createdAt` and `updatedAt`.
- **Reserved types**: `Schema`, `SchemaRevision`, `Migration`, `default` and the relation types `HAS_REVISION` and
  `HAS_MIGRATION` are reserved, see [reserved data types](/reference/security.md#reserved-data-types).
- **Locked types**: writes of elements answer with [`423 Locked`](/api/get-error-423-locked.md) 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.enabled` from the
  [configuration](/reference/configuration.md), it is rejected. `GET /instance-configuration` no longer returns it.
- **Role assignments**: the type of role assignments is `_RoleAssignment`.
  [`POST /user/<uuid>/roles`](/api/post-user-role.md)
  answers with `201 Created` and `Location`, without body. Tokens always return `capabilities`.

## Schemas of existing data

Schemas change little for existing instances, but note:

- **Backups without schemas**: [backups](/command/backup-load.md) which have no `schema/` folder, e.g. those of version
  0.2.x, are loaded with `auto` schemas for their types, i.e. without any validation, see
  [modes](/reference/schemas.md#modes). Define a stricter schema afterwards if you want one. `created` and `updated` are
  renamed to `createdAt` and `updatedAt` while the backup is loaded.
- **Data roles are named neutrally**: the settings `storage`, `placement.roles` and `placement.search` of a schema name
  the data roles `graph`, `document` and `search`, not the databases `neo4j`, `mongodb` and `elasticsearch`. Overrides
  of indices (`index`) and raw indices keep the names of the databases, see [placement](/reference/schemas/placement.md).
- **Index names**: the indices which schemas create are named `ens_<type>_<property>_<intent>_<hash>`. The Neo4j id
  indices which the API manages itself are named `eni_<type>_<hash>` instead of `ember_nexus_<kind>_id_<type>_<hash>`;
  old ones are still recognized, replaced by `index:ensure` and dropped by `database:drop`, so no manual step is
  needed.

## Migrating an instance

1. Create a backup with version 0.2.x, using [`backup:create`](/command/backup-create.md). Stop all clients from writing to
   the instance afterwards.
2. Update the API to version 0.3.0, then reset all databases using [`database:drop`](/command/database-drop.md).
3. Load the backup using [`backup:load`](/command/backup-load.md). It creates the schemas of all types and renames the
   timestamps.
4. Define the schemas you want, see [defining a schema](/guide/defining-a-schema.md).

Backups of versions before 0.2.0 are converted first, see
[migrating to version 0.2.0](/guide/migration/migrating-to-0-2-0.md).

---

Home: [Ember Nexus API docs](/index.md)

Full site map: [llms.txt](/llms.txt)

Previous: [Migration](/guide/migration.md)

Next: [Migrating to version 0.2.0](/guide/migration/migrating-to-0-2-0.md)
