Skip to main content
Data & Schema

Not translated yet — showing English.

Building a Game Schema

You build the schema in Schema, and every change goes live through a migration. Creating an object or editing a field doesn't change anything yet: it is staged. When you're ready, you review the staged changes as one migration and apply it. Open it from Schema under Engineering in the sidebar; it applies to the environment selected in the top bar.

The page has three tabs: Diagram, the whole schema as a graph; Table view, one object and its fields; and History, the migrations applied so far. Clicking an object in the diagram opens it in Table view. The objects and field kinds are described in the Schema Object Reference.


Plan the structure first

Sketch what your game stores before you create anything: which things exist on their own (entities), which groups of fields repeat (parts), and which values come from a fixed list (enums). Create them in that order, enums and parts first, so they are there to pick when you add the fields that use them.

MistakeInstead
Linking a structure that belongs to its parent with a relationshipEmbed it with an inclusion: a ship's stats belong to the ship.
Embedding something that exists on its own with an inclusionLink it with a relationship: a pilot points to a ship many pilots can share.
Repeating the same group of fields in several entitiesPut the group in a part and include it everywhere.
Free-text fields for values from a fixed listUse an enum reference.

Create an object

Pick the kind

Click New ▾ and choose Entity, Part or Enum.

Fill it in

Give it a name and, for an enum, its values. For an entity, also choose its settings: singleton, access and player ownership. The display field is set later, once the entity has fields.

Stage it

Click Stage entity, Stage part or Stage enum. The object appears in the schema marked as unsaved, and the change waits for review.


Add a field

Open the object

Select the entity or part in Table view and click Add field.

Choose the kind

Pick Primitive and its type, Enum reference and the enum, Relationship → entity and the target entity, or Inclusion ↳ part and the part. For a relationship or inclusion, choose 1-to-1 or 1-to-many.

Set it up

Give it a name, and optionally a Default and the constraints Required, Unique and Indexed. See Field settings.

Add it

Click Add field. Like any edit, it is staged until you apply it.

In Table view each object also shows where it is used: Referenced by for an entity, Included in for a part, Used by for an enum.


Review and apply changes

Staged changes go live together, as one migration. While anything is staged, the page header shows Discard and Review migration; with more than one object staged, it also shows how many.

Open the review

Click Review migration. The dialog lists every change and its impact on existing data.

Check the impact

ImpactMeaning
Backward compatible or Breaks backward compatibilityWhether existing reads and writes keep working.
Requires backfillExisting records need a value for the change, for example a new required field without a default.
Rows affected (estimate)How many existing records the migration touches.
WarningsData that would be lost or values still in use, see below.

Apply

Click Apply migration. When it finishes, the dialog says the schema is up to date, or that the migration failed. Cancel closes the review and keeps your changes staged.

Discard throws away everything that is staged.

Staged changes live in your browser

Changes you stage are kept in this browser, for this project, until you apply or discard them. Teammates don't see them, and they don't follow you to another browser.

ChangeWatch for
Making a field required, with no defaultExisting records need a value: the migration requires a backfill.
Changing a field's typeExisting values must convert; the migration requires a backfill.
Making a field unique on an entity with recordsExisting records must not share values.
Removing a fieldIts data goes, see Remove a field.
Removing an enum valueRecords may still use it; the review warns you.

Delete an object

Delete entity, Delete part or Delete enum in an object's editor deletes it straight away, without a migration. An object that is still referenced, included or used can't be deleted until nothing points to it. Deleting an entity that has records asks you to type its name. Deleting a part also deletes its stored rows in every entity that includes it.

Deleting an object is not staged

Unlike other changes, it takes effect the moment you confirm, and there is no review to back out of.


Remove a field and get it back

When a migration removes an optional field, its data is kept for 7 days. During that time the field can still be read but not written. To get it back, add a field with the same name and the same type in a new migration; a different type is refused. After the 7 days, the data is deleted for good.

A required field, or the entity's key, has no such window: its data is deleted when the migration is applied.


History

History lists the project's migrations, newest first, with a badge for how risky each was: Safe, Caution or Breaking. A migration that was never applied shows its status instead of a version: Draft, Planned, Applying, Failed or Cancelled. Narrow the list to a time range.


Next steps

Last updated on 16 Oct 2026