database-migrations

Generate and apply Doctrine ORM migrations for PostgreSQL schemas.

1|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/jakubciszak/family-plan --skill database-migrations-jakubciszak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/jakubciszak/family-plan/tree/main/.claude/skills/database-migrations
Command: npx skills add https://github.com/jakubciszak/family-plan --skill database-migrations-jakubciszak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Doctrine ORM migrations are essential to evolve a PostgreSQL schema in lockstep with application entities. This skill guides developers on creating, diffing, applying, and validating migrations to keep databases in sync with code.

Core Features & Use Cases

  • Generate migrations from entity changes
  • Apply, rollback, and version migrations across environments
  • Validate mappings and schema consistency to prevent drift
  • Inspect migration history and manage migration lifecycle during development and CI/CD

Quick Start

Generate migrations after updating your Doctrine entities and apply them to the target database.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
How do I generate Doctrine migrations from entity changes in PostgreSQL?

To generate Doctrine migrations, update your ORM entities and run the diff command to compare mapping metadata against the current PostgreSQL schema, producing a migration class with the required SQL changes to sync the database.

What is the best way to roll back a PostgreSQL schema migration in a CI/CD workflow?

Rolling back a PostgreSQL schema migration involves executing the downward migration step, which reverts the database to its previous state and updates the migration version history table to maintain consistency across CI/CD environments.

How do I validate Doctrine ORM mappings against a PostgreSQL schema?

Validating Doctrine ORM mappings involves running a schema consistency check that detects drift between your entity metadata and the actual PostgreSQL database structure, preventing synchronization errors before applying migrations.

Can I inspect the migration history and status of a PostgreSQL database using Doctrine?

Yes, you can inspect migration history by running the status and list commands, which display executed and pending migrations, allowing you to manage the migration lifecycle during development and production workflows.

Why does my PostgreSQL database schema drift from my Doctrine entities?

PostgreSQL database schema drift occurs when entity mapping changes are not paired with corresponding migrations, which you can resolve by generating diffs, validating schema consistency, and applying migrations across all environments.