Database Migration

Apply versioned database migrations to a Postgres MCP server.

1|Updated Jan 1, 2026
One-click install
npx skills add https://github.com/RussianRoulette84/agentic_project --skill database-migration-russianroulette84
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Database Migration
Source: https://github.com/RussianRoulette84/agentic_project/tree/main/.claude/skills/db-migrate
Command: npx skills add https://github.com/RussianRoulette84/agentic_project --skill database-migration-russianroulette84

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the safe execution of database migrations on a Postgres MCP server, reducing manual steps and avoiding schema drift.

Core Features & Use Cases

  • Prerequisite verification: ensures Postgres MCP server, migrations directory, and a verified database connection are in place.
  • Transaction-safe migrations: runs each migration inside a transaction with BEGIN/COMMIT, recording applied versions.
  • Schema updates and validation: updates migration state and prompts for model/schema adjustments as needed.

Quick Start

Apply the next pending migration to the configured Postgres MCP server.

Frequently Asked Questions about Database Migration

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

FAQPage Schema
How do I run database migrations safely on a Postgres MCP server?

Database migrations on a Postgres MCP server are executed transactionally using BEGIN/COMMIT blocks to ensure atomic schema updates. This Skill verifies the database connection and migrations directory, then records applied versions in schema_migrations to prevent drift.

What do I need to set up before applying versioned schema changes to my database?

Before applying versioned schema changes, you need a configured Postgres MCP server in .mcp.json, a migrations directory containing scripts, and a verified database connection. The process tracks applied migrations in a schema_migrations table.

How does transaction-safe database migration handle schema updates across environments?

Transaction-safe database migration handles schema updates by wrapping each versioned migration in a database transaction. This ensures atomic application across development, staging, and production environments, updating migration state and prompting for model adjustments.

How are applied migrations tracked to avoid schema drift in Postgres?

Applied migrations are tracked to avoid schema drift in Postgres by recording their versions in a dedicated schema_migrations table. The Skill verifies the database connection and updates this migration state after successfully committing transactional schema changes.

Can I use this to apply pending migrations to staging and production databases?

Yes, you can use this to apply pending migrations to staging and production databases. It automates safe execution of database migrations on a Postgres MCP server across development, staging, and production environments using transaction-safe versioned scripts.