We value your privacy

This site uses cookies to improve your browsing experience, analyze site traffic, and show personalized content. See our Privacy Policy.

  1. MooseStack
  2. Moose Migrate
  3. Apply migrations

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

ScenarioRecommended path
Standalone CLI deploymentmoose migrate
CI/CD-driven database changesmoose migrate
Long-lived Moose Servermoose prod
Manual execution for a one-off rolloutmoose 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

On this page

moose migrate (Standalone CLI)moose prod (Moose Server)When to use eachRecovering from failed migrationsRelated
Edit this page
FiveonefourFiveonefour
Fiveonefour Docs
MooseStackHostingTemplatesGuides
Release Notes
Source577
  • Overview
Build a New App
  • 5 Minute Quickstart
  • Browse Templates
  • Existing ClickHouse
Add to Existing App
  • Next.js
  • Fastify
Fundamentals
  • Moose Server
  • MooseDev MCP
  • Language Server
  • Data Modeling
Moose Modules
  • Moose OLAP
  • Moose Streams
  • Moose Workflows
  • Moose APIs & Web Apps
Deployment & Lifecycle
  • Moose Dev
  • Moose Migrate
    • Delta migrations (beta)
    • Generate migrations
    • Apply migrations
    • Reference
    • Plan Reference
    • Lifecycle Management
    • Fully Managed
    • Deletion Protected
    • Externally Managed
    • Advanced Topics
    • Failed Migrations
  • Moose Deploy
Reference
  • API Reference
  • Query Layer
  • Testing Utilities
  • Data Types
  • Table Engines
  • CLI
  • Configuration
  • Observability Metrics
  • Help
  • Release Notes
Contribution
  • Documentation
  • Framework