Skip to content

Gap Commands

Detect and resolve missing migrations.

queen gap detect

Detect gaps in migration sequence.

queen gap detect

Examples

queen gap detect
Gap Detection Report
Found 2 gaps

Version: 002
Type: Application Gap
Status: Registered but not applied
Impact: 3 migrations applied after this gap

Version: 005
Type: Unregistered Gap
Status: Applied but not registered in code

Uses the global --json flag for JSON output.


queen gap analyze

Analyze gap dependencies and impact.

queen gap analyze

Examples

queen gap analyze

Shows which migrations are blocked by gaps, severity levels, and recommended actions.


queen gap fill

Fill detected gaps.

queen gap fill [VERSIONS...] [flags]
Flag Type Default Description
--mark-applied bool false Mark as applied without executing

Examples

queen gap fill 002                  # Apply missing migration
queen gap fill 002 --mark-applied   # Record without executing
queen gap fill 002 003 004          # Fill multiple gaps

--mark-applied records the migration in the tracking table without running the SQL. Use when the migration was applied manually or is not needed.


queen gap ignore

Mark a gap as intentional.

queen gap ignore VERSION [flags]
Flag Type Default Description
--reason string "" Reason for ignoring

Examples

queen gap ignore 002 --reason "Removed migration, superseded by 005"

Adds the version to .queenignore:

002 # Removed migration, superseded by 005

Queen skips this gap in future detection runs.


queen gap list-ignored

List all ignored gaps.

queen gap list-ignored

Shows all versions in .queenignore with their reasons.


queen gap unignore

Remove a gap from the ignore list.

queen gap unignore VERSION

Examples

queen gap unignore 002

Removes the version from .queenignore. The gap will appear in future detection runs.