Custom types & enums
Define named enums once and reuse them as field types anywhere in the diagram — instead of repeating the same set of allowed values on field after field.

Defining an enum
Open the Types panel and:
- Click + New type and edit its name.
- Click + value to add values.
- Edit or remove value chips inline (you can't remove the last value).
- Remove a whole type with the trash icon.
Using an enum
Select the enum as a field's type in any type picker — it appears alongside the dialect's built-in types.
:::warning Deleting a type in use If you delete a type that a field still references, validation flags an enum-type-missing error on that field. Repoint or remove the field first. :::
Sample enums
The Acme Storefront sample defines three:
| Type | Values |
|---|---|
product_status | draft, active, archived |
order_status | pending, paid, shipped, cancelled |
payment_method | card, paypal, bank_transfer |
These map to a native ENUM or a CHECK constraint in the generated SQL, depending on the dialect — see Export → SQL.