What problem does it solve?
Prevents accidental inclusion of unrelated db/schema.rb changes in pull requests by cross-referencing schema diffs against the migrations actually changed in the PR, reducing noisy diffs and merge conflicts.
Core Features & Use Cases
- Identify PR migrations: Enumerates migration files changed in the PR and extracts migration timestamps for comparison.
- Analyze schema diffs: Compares db/schema.rb changes against the PR base branch to surface version mismatches and new tables, columns, or indexes.
- Cross-reference and report drift: Flags schema additions that lack corresponding create_table/add_column/add_index entries in PR migrations and produces actionable remediation steps.
- Use Case: Run during Rails PR review to ensure schema.rb only contains changes introduced by the PR's migrations, preventing inadvertent carryover from other branches.
Quick Start
Compare the PR's db/schema.rb to the PR base and verify every added table, column, and index is introduced by a migration included in the PR.