migration-helper

Create Polibase database migrations with sequential numbering and idempotent SQL.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/trust-chain-organization/polibase --skill migration-helper
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: migration-helper
Source: https://github.com/trust-chain-organization/polibase/tree/main/.claude/skills/migration-helper
Command: npx skills add https://github.com/trust-chain-organization/polibase --skill migration-helper

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PostgreSQL, and includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill simplifies and standardizes the creation of database migrations, preventing common errors that lead to inconsistent database states. It automates the adherence to critical steps like sequential numbering, proper naming, and mandatory updates to the 02_run_migrations.sql script, saving developers from complex debugging and data loss.

Core Features & Use Cases

  • Mandatory Step Enforcement: Highlights and enforces critical steps for migration creation, especially updating the master run script.
  • Idempotent SQL Patterns: Guides on writing migrations using IF NOT EXISTS/IF EXISTS to ensure they are safe to run multiple times.
  • Common Migration Patterns: Provides examples and templates for adding tables, columns, indexes, foreign keys, and enum types.
  • Use Case: When you need to add a new column to a database table, this skill guides you through finding the next sequential number, creating the SQL file, updating the 02_run_migrations.sql script, and testing the migration, ensuring a smooth and error-free schema change.

Quick Start

I need to add a new email column to the politicians table. Guide me through the migration process, including all mandatory steps and best practices.

Frequently Asked Questions about migration-helper

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

FAQPage Schema
How do I create database migrations with proper naming and sequencing?▼

Database migrations require sequential numbering, descriptive names, and idempotent SQL using IF NOT EXISTS/IF EXISTS clauses. This Skill automates the creation process, ensures correct file naming, and enforces mandatory updates to the 02_run_migrations.sql script to prevent schema inconsistencies.

What's the best way to add a new column to a PostgreSQL table safely?▼

Use idempotent migration patterns with IF NOT EXISTS to ensure the change runs safely multiple times. This Skill guides you through finding the next sequential migration number, writing the SQL, updating the master run script, and testing via reset-database.sh.

How do I ensure database schema changes are applied consistently across environments?▼

Enforce sequential migration numbering, descriptive naming conventions, and mandatory inclusion in the run migrations script. This Skill automates these critical steps and verification through reset-database.sh, preventing common errors that lead to inconsistent database states.

Can I automate the creation of database migrations for tables, columns, indexes, and constraints?▼

Yes. This Skill provides templates and patterns for adding tables, columns, indexes, foreign keys, and enum types while enforcing idempotent SQL and sequential file organization, eliminating manual errors in schema evolution.

Why should migrations use IF NOT EXISTS and IF EXISTS patterns?▼

Idempotent SQL patterns ensure migrations run safely multiple times without errors or data loss. This Skill enforces these patterns and guides their implementation across common schema changes like adding columns, creating indexes, and defining constraints.

Do I need to manually update the run migrations script for each new migration?▼

The mandatory step is updating 02_run_migrations.sql to include each new migration file. This Skill highlights and enforces this critical requirement, preventing migrations from being skipped and causing schema drift between environments.