Apply migrations
Delta-based workflow — opt-in during beta
This overview describes the delta-based migration workflow, enabled with features.migrate_with_deltas = true in moose.config.toml. The current default is false; once beta testing ends, delta migrations will become the default. Until then, moose migrate and moose prod run the legacy plan.yaml workflow — see the reference pages linked below for current behavior.
Once a migration plan has been generated, Moose provides two execution paths. Choose the one that matches your deployment model.
moose migrate (Standalone CLI)
Apply migrations manually or from a CI/CD step as a one-shot command. Use this for Standalone CLI deployments or pipelines that don't run a long-lived Moose Server.
See moose migrate (Standalone CLI) for details.
moose prod (Moose Server)
Apply migrations automatically when the Moose Server starts. Use this for long-lived server deployments where migrations run as part of the application lifecycle.
See moose prod (Moose Server) for details.
When to use each
| Scenario | Recommended path |
|---|---|
| Standalone CLI deployment | moose migrate |
| CI/CD-driven database changes | moose migrate |
| Long-lived Moose Server | moose prod |
| Manual execution for a one-off rollout | moose migrate |
Recovering from failed migrations
If a migration fails partway through, see Failed Migrations for recovery guidance.
Related
- Generate migrations — how migration plans are produced
- Migration Plan — the plan-file format and editable operations
- Lifecycle management — controlling which changes Moose is allowed to make