For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a schema

Create a collection — build its schema (fields and form) and publish it.

Where: Database → Collections → Add New · /projects/<project>/db/schemas/new

Every collection is defined by two schemas that you edit together:

  • the data schema — what is stored and checked: fields, types and rules. It is JSON Schema with 17 field types: text (with formats like email and uri, and translatable text), integers, decimals, money, yes / no, dates, enums, tags, files, geolocation, free-form JSON, references to users, roles, taxonomy terms and other records, nested forms and arrays. Every type, its keywords and what the server refuses: Field type reference.

  • the UI schema — how the record form looks: tabs → containers → cells on a 12-column grid, each cell showing one field with its widget, label and form hints (placeholder, help, relative date bounds, …). What goes where: Schema authoring guide.

Before you start

  • The Database module is on and has a default integration — see Integrations.

  • You need database:create on database:schema:all.

Steps

  1. Open Database → Collections and press Add New. The builder opens as New schema, on the Schema tab, with an empty Visual Builder. The List, Triggers and Settings tabs open after the first save.

    New schema: the tabs Schema, List, Triggers and Settings, an empty Schema name field, the inner tabs Visual Builder, Preview and JSON, and an empty builder; a Show fields panel button at the top right
    A new, empty schema.
  2. Type the Schema name, for example authors. It becomes the collection name in API paths (/database/collections/authors).

  3. Add the fields. Either:

    • Visual Builder — add a container, then drag fields from the Form fields panel (Show fields panel) into it: Text, Number, Date, Select, Yes/No, File, Email, URI, Rating, Nested Form, Geo Location, Tags, Long text, HTML, Date & time, JSON and Array. The gear icon of a field sets its label, whether it is required, and its limits; the number on the right (6/12) is its width. Select covers a fixed list and the four reference kinds (users, roles, taxonomy terms, records of a collection); Nested Form and Array nest up to five levels — see Nested forms and arrays.

    • JSON → Edit JSON — paste the data schema into the top editor and the UI schema into the bottom one, then press Save schemas' changes. The button turns on only when both are valid JSON.

    The JSON tab in edit mode: the data schema of authors (name, country, born) in the top editor and the UI schema with one tab Author in the bottom editor
    JSON → Edit JSON: the data schema on top, the UI schema below.

    Example data schema for authors:

    {
      "$schema": "https://norbix.ai/schemas/meta/v1.json",
      "title": "authors",
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "name": { "type": "string", "maxLength": 200 },
        "country": { "type": "string", "maxLength": 100 },
        "born": { "type": "integer", "minimum": 0 }
      },
      "required": ["name"]
    }
  4. Check the result in Visual Builder (the layout) and Preview (the form your team will fill).

    Visual Builder of authors: one tab Author with a container that holds Name (Required, 6/12), Country (3/12) and Born (3/12)
    The Visual Builder after the JSON was applied.
  5. Press Save & publish. To keep the schema unpublished for now, press Create draft instead; it then waits under Schemas under development.

    Button
    What it does

    Create draft

    Saves the schema as a draft. No records can be added until it is published.

    Save & publish

    Saves and publishes version 1; the collection is ready for records.

    Cancel

    Goes back to the Collections list without saving.

Result

Cloud goes back to Database → Collections, and the new collection is listed as Published · v1. Click its name to open its empty records list and press Add New to add the first record.

Data Collections list with books, archive_2024 and authors, all Published · v1; reviews under Schemas under development
The new collection authors in the list.

The same schema drives the record form in Cloud and the checks on every API write: change it once, and both follow.

Create with the AI assistant. When the project has an AI assistant set up (see AI), Create using AI Chat appears next to Schema name and opens the assistant; describe the collection ("authors with a name, a country and a year of birth") and it drafts the fields into the builder. Nothing is saved until you press Create draft or Save & publish. From an MCP client, the same job is done by apply_database_schema_bundle — see What agents can do.

Change or remove it later

  • Edit — row menu → Edit schema: change fields as a draft, then publish a new version — see Edit a schema.

  • Settings — the schema's Settings tab: description, Soft delete, Records have an owner, AI Embed — see Edit a schema.

  • Delete — Settings tab → Delete schema...; the dialog asks you to paste the schema id and says how many records will be deleted with it — see Edit a schema.

A schema is created in the environment you are working in. To get it into PROD, build it in TEST and promote TEST → PROD. Names are unique per environment.

Do it from code

The client setup is on the Database page. API: Save Database Schema · Publish Database Schema

Last updated

Was this helpful?