github-monolith-migrations

Coordinate and document database migrations for the GitHub monolith across Rails projects.

Updated Aug 8, 2021
One-click install
npx skills add https://github.com/luanzeba/dotfiles --skill github-monolith-migrations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-monolith-migrations
Source: https://github.com/luanzeba/dotfiles/tree/main/skills/github-monolith-migrations
Command: npx skills add https://github.com/luanzeba/dotfiles --skill github-monolith-migrations

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

The GitHub monolith migrations guide helps teams coordinate and document database migrations across a large codebase, ensuring consistency in schema changes and ownership across Rails apps.

Core Features & Use Cases

  • Pre-flight guidance for updating migration-related configuration files (db/migrate, db/tableowners.yaml, lib/github/database_structure.rb, db/schema-domains.yml, and sorbet RBI files) as part of a change-set.
  • Clear patterns for generating migrations with Rails, testing migrations, applying RuboCop rules to maintain quality, and ensuring changes are auditable.
  • Use case: when introducing a new table or modifying an existing one across multiple clusters with defined ownership and domain constraints.

Quick Start

Start by generating a new migration with Rails and updating the related configuration files to reflect the schema change.

Frequently Asked Questions about github-monolith-migrations

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

FAQPage Schema
How do I coordinate database migrations across multiple Rails projects in a monolith?

To coordinate database migrations, update configuration files such as db/migrate, db/tableowners.yaml, and db/schema-domains.yml to maintain schema consistency across Rails apps. This ensures changes remain documented and auditable across multiple clusters.

What files need to be updated when adding a new table to a Rails monolith?

When adding a new table, update db/migrate, db/tableowners.yaml, lib/github/database_structure.rb, db/schema-domains.yml, and sorbet RBI files. These files maintain table ownership, structure, and schema domain consistency across the monolith.

How do I test database migrations and enforce code quality in Rails?

Testing database migrations involves applying specific testing practices and enforcing RuboCop rules to maintain code quality. This ensures schema changes are reliable and meet consistency standards before being applied across clusters.

When do I need to update schema domains and table ownership configuration?

Update schema domains and table ownership configuration when creating new tables, adding columns, modifying indexes, or updating related configurations. This maintains consistency across defined ownership and domain constraints in the monolith.

Does this migration approach work with Sorbet type definitions in Rails apps?

Yes, this approach integrates with Sorbet by requiring updates to sorbet/rbi/dsl/*.rbi files. This ensures type definitions remain consistent with database structure changes during the migration process across the monolith.

What are the limitations of managing schema changes through db/schema-domains.yml?

Managing schema through db/schema-domains.yml requires strict coordination across teams to avoid conflicts. Changes must align with table ownership and domain constraints, and missing updates can cause inconsistencies across multiple clusters.