Registry stack documentation: machine-readable Markdown.
Index of all pages: https://docs.registrystack.org/llms.txt
Full corpus: https://docs.registrystack.org/llms-full.txt

# bregctl migration draft command reference

> Generated syntax and options for bregctl migration draft.

{/* Generated from crates/registry-cli-docs/catalog.json and the workspace version in Cargo.toml by scripts/generate-cli-reference.mjs. Run npm run generate. */}

Write the reviewed migration directory for a successor whose changes need no SQL.

## Contract status

This page is generated from the public Clap command tree for Registry Stack source version `0.49.0` and catalog SHA-256 `5ee58a079f1cede7ba2da71f1d8945c0b683f5f54e8d871fdbcb8648c998872c`. Hidden implementation commands are omitted.

## Description

Write the reviewed migration directory for a successor whose changes need no SQL. Covers every access or disclosure change against the baseline package. Compatible-additive changes, such as an optional field, may sit beside them and stay uncovered: the registry applies those through its own additive plan. Any other change is refused. Measures the candidate on the disposable database the runtime configuration names, and writes descriptor.json and rehearsal.json under \<OUTPUT>/modules/\<MODULE>/migrations/\<ID>. Pass \<OUTPUT> as --reviewed-migrations to test and package. Never overwrites an existing migration.

## Usage

```text
bregctl migration draft [OPTIONS] --baseline-package <ABSOLUTE_DIRECTORY> --runtime-config <ABSOLUTE_FILE> --output <ABSOLUTE_DIRECTORY> --module <LOCAL_ID> --id <LOCAL_ID> <PROJECT>
```

## Arguments

| Argument | Always required | Default | Values | Environment | Description |
| --- | --- | --- | --- | --- | --- |
| `<PROJECT>` | Yes | n/a | n/a | n/a | Base Registry Engine project directory. A symbolic link at any component of this path is refused. |

## Options

| Option | Always required | Default | Values | Environment | Description |
| --- | --- | --- | --- | --- | --- |
| `--baseline-package <ABSOLUTE_DIRECTORY>` | Yes | n/a | n/a | n/a | Absolute directory of the chain tip package the successor follows. A symbolic link at any component of this path is refused. |
| `--runtime-config <ABSOLUTE_FILE>` | Yes | n/a | n/a | n/a | Runtime configuration file of the disposable schema-test database. A symbolic link at any component of this path is refused. |
| `--posture <POSTURE>` | No | n/a | n/a | n/a | Declared posture: development or production. Unset means production |
| `--output <ABSOLUTE_DIRECTORY>` | Yes | n/a | n/a | n/a | Absolute reviewed-migrations directory the draft is written under. A symbolic link at any component of this path is refused. |
| `--module <LOCAL_ID>` | Yes | n/a | n/a | n/a | Module the migration directory belongs to |
| `--id <LOCAL_ID>` | Yes | n/a | n/a | n/a | Identifier of the migration, also its directory name |
| `--format <FORMAT>` | No | `human` | `human`, `json` | n/a | Emit the selected command's report in this format |
| `-h, --help` | No | n/a | n/a | n/a | Print help (see a summary with '-h') |

## Generation contract

After changing a public command, argument, option, default, environment binding, or help description, run `cargo run --locked -p registry-cli-docs -- --write`, commit `crates/registry-cli-docs/catalog.json`, then run `npm run generate` from `docs/site`.