Models & Schema
Defining your data models and relationships.
What is a model in Underpeaks?
A model is a schema definition for one table — its columns, types, and constraints.
What field types are available?
The full list of supported column types for models.
What's the difference between type and ui_type?
type controls storage; ui_type only controls the editor input.
How do I hide a field from the public API?
Set hidden: true on a column to exclude it from public API responses.
How do I set up a relationship between two models?
How to declare foreign keys at the column or table level.
How do I enforce a unique constraint?
Use unique: true for a single column, or a constraints entry for composite uniqueness.
Does the API return related records automatically?
No — fetch related records with a separate request; the API doesn't auto-expand foreign keys.