db-migration

Generate reversible PostgreSQL migrations for Liquibase or Flyway.

13|4|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/OmexIT/claude-skills-pack --skill db-migration-omexit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-migration
Source: https://github.com/OmexIT/claude-skills-pack/tree/main/skills/db-migration
Command: npx skills add https://github.com/OmexIT/claude-skills-pack --skill db-migration-omexit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL migrations are error-prone and time-consuming without a structured process. This skill helps generate safe, reversible migrations for Liquibase or Flyway, enforcing rollback, auditing, and safe index handling.

Core Features & Use Cases

  • Generates migration files for Liquibase or Flyway from user-described schema changes.
  • Enforces safety rules (rollback, CONCURRENTLY for index creation on large tables, NOT VALID/VALIDATE for FKs, audit columns, and idempotent seeds) and provides verification queries.
  • Supports mode detection, change backfills, auditing, and production-safe workflows for database schema evolution.

Quick Start

Describe your intended schema change and run the db-migration skill to generate a safe, reversible migration.

Frequently Asked Questions about db-migration

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

FAQPage Schema
How do I generate safe PostgreSQL migrations with rollback support?

To generate safe PostgreSQL migrations, describe your schema change to trigger automated creation of reversible Liquibase or Flyway files. The process enforces strict rollback queries, audit columns, and TSID-based BIGINT primary keys to ensure production safety.

How do I add a foreign key constraint without locking a large PostgreSQL table?

Adding a foreign key constraint without locking a large PostgreSQL table requires using NOT VALID followed by VALIDATE. This workflow generates migrations that enforce this safety rule, preventing disruptive table locks during constraint creation.

Does Flyway support reversible migrations and index creation with CONCURRENTLY?

Flyway supports reversible migrations and production-safe index creation when guided by this generation process. The workflow enforces CONCURRENTLY for indexes on large tables and strict rollback queries, ensuring schema evolution integrity for multi-tenant databases.

Can I use Liquibase to backfill data and add audit columns in a multi-tenant database?

You can use Liquibase to backfill data and add audit columns in a multi-tenant database. The workflow generates migration files that handle change backfills, enforce auditing requirements, and provide verification queries for production-safe execution.

What is the best way to handle schema evolution and remove constraints across production PostgreSQL databases?

The best way to handle schema evolution and remove constraints across production PostgreSQL databases is using a structured migration process. It generates testable rollback and verification queries, enforcing safety rules for constraint removal and ensuring reversible changes.