Skip to content
MACHHUB MACHHUB MACHHUB
Contribute to this page

Build a Collection

Collections are typed data tables. The Database · Collections page (/database/collections) lets you define a collection’s schema and add records to it. This page walks through both.

  • A signed-in session in a domain where you have Collections permission (see Groups & permissions).
  • Collections are scoped to the active Domain, so confirm the domain switcher is set to the right tenant first.

The page is split into two resizable panes:

  • Left — the collection list. Each entry shows the collection name and its field count, with a delete (trash) button. The Add Collection button sits at the bottom.
  • Right — the records table for the selected collection, with a breadcrumb, a refresh button, and an Add Record button.
The Collections two-pane view with a collection selected and several records.
Collections (/database/collections) — collection list and records.
  1. Click Add Collection. A panel slides in from the right.
  2. Enter a Name. Names must start with a letter and contain only letters, numbers, and underscores.
  3. Optionally add a Description.
  4. Every collection starts with a locked id field (type record). You cannot rename or remove it — it is the record’s primary key.
  5. Click Add Field and pick a type from the picker, then type the field’s name. Repeat for each field. Remove a field with its trash button.
  6. Click Save.
Creating a collection: Add Collection, name it, add fields, Save, and it appears in the list.
Add Collection → name it → add fields → Save.

The Add Field picker offers ten types:

TypeUse it for
StringText.
NumberNumeric values.
BooleanTrue/false (a switch in the record form).
URLA link.
DateTimeA date and time field.
FileAn uploaded file (stored inline).
JSONAn arbitrary JSON object, edited in a code box.
Rich EditorFormatted rich-text content.
EnumA value chosen from a fixed list of options.
RelationA reference to a record in another collection.

For a Relation field, a Select a collection dropdown appears next to the field name — choose which collection it points at. (The id field’s record type is the built-in primary key and is not one of the ten pickable types.) You can also define Indexes (unique or full-text) on the collection from the same form.

Saving persists the schema to the platform.

Select a collection in the left pane to load its records into the table on the right. Each column renders according to its field type — for example, booleans show as a checkmark, dates are formatted, JSON is stringified, and relations show the related record’s ID. Use the refresh button to re-fetch the data.

Each row has a pencil button to edit the record (it opens the same form, pre-filled) and a trash button to delete it.

  1. With a collection selected, click Add Record. A form slides in from the right with one input per field, typed to match the schema.
  2. Fill the fields:
    • id is optional — leave it empty to auto-generate.
    • String / Number / URL use plain text/number inputs.
    • Boolean is a toggle switch.
    • DateTime opens a date-and-time picker.
    • File is a file upload.
    • JSON is a code box pre-filled with a small template.
    • Relation uses a record picker: click Open picker, search and select a record from the related collection, then Set selection.
  3. Click Save. The record is persisted to the collection and the table refreshes.
Adding a record: fill typed inputs, toggle a switch, pick a date, use the relation picker, then Save.
Add Record → fill typed inputs → Save.