database-migration

Generate PostgreSQL forward and rollback migration scripts for schema changes.

Updated Sep 12, 2025
One-click install
npx skills add https://github.com/ammonsd/ActivityTracking --skill database-migration-ammonsd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migration
Source: https://github.com/ammonsd/ActivityTracking/tree/main/skills/database-migration
Command: npx skills add https://github.com/ammonsd/ActivityTracking --skill database-migration-ammonsd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams implement safe PostgreSQL schema changes by providing forward migrations with accompanying rollback scripts and clear documentation.

Core Features & Use Cases

  • Safe upgrade/downgrade migrations with forward and rollback scripts.
  • Migration templates and patterns for adding tables, columns, indexes, and data migrations.
  • Guidance for testing in copy environments and documenting changes.

Quick Start

Use the database-migration skill to generate a forward migration that adds a new column to an existing table and provides its rollback.

Frequently Asked Questions about database-migration

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

FAQPage Schema
How do I create safe PostgreSQL migrations with rollback scripts?

Safe PostgreSQL migrations require forward scripts paired with rollback scripts to ensure non-destructive schema changes. This skill generates both upgrade and downgrade templates for adding tables, columns, indexes, and data modifications across development, staging, and production environments.

What is the best way to add a column to a PostgreSQL table without downtime?

The best way to add a column without downtime is using non-destructive migration patterns. This skill provides templates for adding columns with forward and rollback scripts, ensuring you can safely apply and revert schema changes across development, staging, and production environments.

Does this PostgreSQL migration approach work for production environments?

Yes, this PostgreSQL migration approach works for production environments. It enforces non-destructive practices, requires rollback scripts for every change, and provides testing guidance for copy environments to ensure safe schema changes in development, staging, and production.

How do I rollback a schema change in PostgreSQL after a failed migration?

To rollback a schema change in PostgreSQL, you need a dedicated downgrade script that reverses the forward migration. This skill enforces non-destructive practices by requiring rollback scripts for all schema changes, including adding tables, columns, indexes, and data migrations.

Can I use this for data migrations and index creation in PostgreSQL?

Yes, you can use this for data migrations and index creation in PostgreSQL. The skill provides migration templates and patterns for modifying data, creating indexes, adding tables and columns, with accompanying rollback scripts and documentation guidance.

What are the limitations of automated PostgreSQL schema changes?

Automated PostgreSQL schema changes require careful testing in copy environments before applying to production. This skill enforces non-destructive practices and mandatory rollback scripts, but limitations include the need for thorough testing guidance and clear documentation for complex data migrations.