Fields: add
fields_addAdds a field to an entity to extend its schema with custom types, constraints, and display options.
Instructions
Add a field to an entity
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Field name (snake_case) | |
| type | No | Database type: varchar, varchar array, text, integer, integer array, bigint, bigint array, decimal, decimal array, boolean, date, timestamp, jsonb, geo, file, user, one-to-one, one-to-many, many-to-one, many-to-many, dynamic-reference | |
| label | No | Human-readable label | |
| entity | Yes | Entity name | |
| public | No | Mark field as public | |
| target | No | Target entity name for relationship fields (many-to-one, one-to-many, many-to-many) | |
| unique | No | Enforce unique constraint | |
| default | No | Default value | |
| display | No | Display type: input, textarea, rich-text, select, entity-select, radio, country-select, checkbox, short-date, long-date, timestamp, relationship, file, secret, user, jsonb, geo, dynamic-reference | |
| indexed | No | Add database index | |
| options | No | Comma-separated option list for select display, e.g. "Running,Cycling,Rugby". Use label=value to split, e.g. "Running=running,Cycling=cycling" | |
| multiple | No | Allow multiple values on a select field | |
| required | No | Mark field as required | |
| on_delete | No | Deletion behavior: CASCADE, SET NULL, SET DEFAULT, RESTRICT (default: CASCADE). Underscores are accepted (SET_NULL, SET_DEFAULT) and normalised. | |
| name_field | No | Set as name field | |
| searchable | No | Enable full-text search on this field | |
| description | No | Field description |