Archituredocs

Column definitions

Reusable column types and enums shared by every database of your organization, so one meaning has one definition.

A column definition is a named, reusable column type of your organization: an enum such as order_status with its values, or a type with a meaning such as email_address or money_amount. Columns in any database link to it and take its type, values, information type and description. When the definition changes, every linked column follows.

Definitions belong to the organization, not to a database, like the tech stack and the skills. That is what lets your agents reuse the same order_status everywhere instead of inventing a new set of values in each session.

What a definition holds

FieldMeaning
NameHow columns and agents refer to it, for example copy_condition
KindEnum, with its values in order, or Other data type
Data typeFor another data type, the SQL type, for example text or numeric(12,2). An enum's type is its own name
DialectPostgreSQL, MySQL, or Every dialect for a portable definition
Information typeThe information type of every linked column
Allows NULL and default valueCopied onto a column when it links, as a starting point; the column can change them afterwards
DescriptionRich text, read by people and agents

The Column definitions page

Column definitions, under Databases in the organization's sidebar, lists the definitions In use and the Archived ones. New definition creates one; the menu of each definition offers Edit, Archive (or Restore) and Delete.

  • Edit: every column linked to the definition follows the change, in every database.
  • Archive: the definition leaves the type pickers, and the columns already linked to it keep it. Restore brings it back.
  • Delete: refused while columns link to it; archive it instead, or link those columns to another type first. A definition no column uses is deleted for good.

Owners, admins and members create, edit, archive and delete definitions; viewers read them. Like every write, it needs an active trial or subscription (see Billing and trial).

Linking a column

In the canvas, open a column's type picker: Column definitions come first (those of the database's dialect and the portable ones), then the dialect's Data types. Choosing a definition links the column, and the column shows a chain icon. New column definition… at the end of the definitions creates one and links the column to it.

A linked column:

  • reads its data type, values, information type and description from the definition;
  • keeps its own name, nullable, default, primary key, unique and auto-increment settings and its position;
  • gets the definition's nullable and default when it links, as a starting point.

To unlink, choose Unlink and keep the type in the column's details, or choose a plain data type in the type picker.

Where definitions come from

  • The Column definitions page, or New column definition… in the canvas's type picker. In a draft, definitions stay in the draft until you save it; saving creates them in your organization.
  • Imports: every enum type of an imported database becomes a definition, or links to an existing definition with the same name and values. See Import.
  • Agents do not create definitions. They read them with the MCP tool list_column_definitions and link columns to them with create_table and update_column; the skill tells them to prefer an existing definition over a new enum, and to ask you when none fits.

In SQL, DBML and text

  • PostgreSQL export: a definition with values becomes CREATE TYPE <name> AS ENUM (...), and linked columns use that type.
  • MySQL export: linked columns get an inline ENUM(...) with the definition's values.
  • DBML export: the enum types, without the links.
  • Text format: a linked column carries the setting use: <definition name>, and the database's enums appear as Enum blocks. The text can link and unlink columns, but not change a definition. See the text format.

The issues panel warns when a definition used in the database has a type the database's dialect does not know, or was made for the other dialect (rule unknown_data_type).

On this page