schema-drift-detector

Detect unrelated schema.rb changes in pull requests by cross-referencing database migrations.

240|75|Updated Jul 13, 2023
One-click install
npx skills add https://github.com/udecode/plate-playground-template --skill schema-drift-detector-udecode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: schema-drift-detector
Source: https://github.com/udecode/plate-playground-template/tree/main/.codex/skills/schema-drift-detector
Command: npx skills add https://github.com/udecode/plate-playground-template --skill schema-drift-detector-udecode

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents accidental inclusion of unrelated database schema changes in pull requests, which commonly occurs when developers run migrations from other branches.

Core Features & Use Cases

  • Migration Verification: Compares schema.rb changes against migrations included in a pull request.
  • Drift Detection: Identifies extra columns, tables, indexes, or version mismatches not originating from the PR's migrations.
  • Use Case: When reviewing a pull request that includes database migrations, use this Skill to ensure that the schema.rb file only reflects the changes intended by the PR, not stray updates from the main branch.

Quick Start

Use the schema-drift-detector to verify that the schema.rb changes in this PR are only related to the included migrations.

Frequently Asked Questions about schema-drift-detector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect unrelated schema.rb changes in a Rails pull request?

Detect unrelated schema.rb changes by cross-referencing the file against included database migrations. This identifies drift indicators such as extra columns, indexes, or version mismatches not present in the PR's migration files.

Why does my pull request include database schema changes from other branches?

Schema drift occurs when developers run migrations from other branches. This Skill prevents accidental inclusion of these stray database schema updates by validating changes against the migration history within the specified branch context.

How do I verify a Rails migration matches the schema.rb file in a PR?

Verify migration and schema alignment by comparing schema.rb changes against migrations included in a pull request. This ensures the schema only reflects changes intended by the PR's migration files.

Can I check for extra columns or indexes in schema.rb not originating from a PR's migrations?

Yes, you can identify extra columns, tables, indexes, or version mismatches not originating from the PR's migrations. This ensures schema integrity by validating changes against the migration history within the specified branch context.

What are the limitations of automated schema drift detection in code review?

Schema drift detection is limited to comparing schema.rb files against included database migrations within a specified branch context. It identifies extra columns or version mismatches but requires migration files to be present in the pull request to function correctly.