netlify db migrations pull
Introduced 2026-04-09 · score 0.90
HOW TO USE IT
When local migrations need to match production or a remote branch, run `netlify db migrations pull`; it replaces the local migrations directory after confirmation unless `--force` is used.
netlify db migrations pullnetlify db migrations pull --branch <branch>netlify db migrations pull --branch --force --jsonWHY THIS HELPS
Replace local database migrations with migrations from production or a specified branch.
REQUIREMENTS AND LIMITATIONS
- Version: 24.11.0
- --branch [branch] (-b): Pull from the named branch; defaults to production. With no value, uses the local Git branch.
- --force: Skip the confirmation prompt before overwriting local migration files.
- --json: Output the result as JSON.
- Prerequisite: The project must be linked with `netlify link`.
- Prerequisite: Log in with `netlify login`.
- The command overwrites the local migrations directory.
- The default production pull prompts for confirmation.
FIRST-PARTY EVIDENCE
- https://github.com/netlify/cli/releases/tag/v24.11.0
- https://github.com/netlify/cli/pull/8139
- https://github.com/netlify/cli/blob/v24.11.0/src/commands/database/database.ts
- https://github.com/netlify/cli/blob/v24.11.0/src/commands/database/migration-pull.ts
Check the installed version and the source before using it. Entry JSON