Synopsis
cluck molt <new/run/down> [--dry-run]
Description
Runs database schema migrations. Always preview first with --dry-run, which reports SQL and the estimated lock time.
Options
| Flag | Description |
|---|---|
--dry-run | Show the SQL without running it |
--to V | Migrate up or down to a version |
--lock-timeout MS | Abort if a lock takes too long |
All commands also accept the global flags --coop, --json, --quiet, and --no-color, plus --help, which prints this page in a smaller font.
Example
$ cluck molt run --dry-run
+ ALTER TABLE orders ADD COLUMN note text;
est. lock: 4ms
Exit codes
| 0 | Success. A quiet cluck. |
|---|---|
| 1 | The command ran but reported a problem, such as a failing check. |
| 2 | Bad usage: a flag was missing or invalid. |
| 3 | Authentication or permission error. See HEN-2001. |