> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eventdbx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Column Definition

> Define schema columns for events and snapshots.

Columns describe the shape of each event payload. EventDBX treats them as contracts: once defined, they guide validation, documentation, and downstream tooling.

## Supported types

* `integer`
* `float`
* `decimal(precision,scale)`
* `boolean`
* `text`
* `timestamp`
* `date`
* `json`
* `binary`
* `object`

## Adding columns

```bash theme={null}
dbx schema create person --events person_registered,person_updated --snapshot-threshold 50
dbx schema field person first_name --type text --required
dbx schema field person age --type integer --range-min 0
dbx schema field person status --type text --format snake_case
```

Columns apply to future events only. Historical payloads remain untouched but will fail validation if replayed without the required fields.

## Documenting ownership

Annotate events with notes so teammates know intent or risk:

```bash theme={null}
dbx schema annotate person person_updated --note "Includes PII; keep payload mode minimal for plugins"
```

## Deprecating fields

When a column is no longer needed, clear its type/rules and stop allowing it for events:

```bash theme={null}
dbx schema field person legacy_id --clear-type --clear-rules
dbx schema alter person person_updated --remove legacy_id
```

Deprecation warns producers while keeping historical events valid. Downstream systems should stop sending or expecting the field once removed from the allow-list.
