pgpm

Manage PostgreSQL schema migrations with deploy, revert, and verify scripts.

1|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/constructive-io/constructive-skills --skill pgpm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pgpm
Source: https://github.com/constructive-io/constructive-skills/tree/main/skills/pgpm
Command: npx skills add https://github.com/constructive-io/constructive-skills --skill pgpm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines PostgreSQL database schema management by providing deterministic, plan-driven migrations and dependency management, akin to package managers like npm for code.

Core Features & Use Cases

  • Automated Migrations: Define database changes with deploy, revert, and verify scripts for safe, repeatable deployments.
  • Dependency Management: Handle dependencies between changes and across modules within a workspace.
  • Module Packaging: Package and publish SQL database logic as reusable modules.
  • Use Case: When developing a new feature that requires database schema changes, use pgpm to add new tables, functions, and indexes, ensuring they can be reliably deployed and reverted across different environments.

Quick Start

Use the pgpm skill to deploy all pending database changes to the 'myapp_dev' database.

Frequently Asked Questions about pgpm

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

FAQPage Schema
How do I manage PostgreSQL database migrations deterministically?

PostgreSQL database migrations are managed deterministically using plan-driven scripts that define deploy, revert, and verify steps, ensuring schema changes are repeatable and safe across environments.

What is the best way to handle SQL dependency tracking across database modules?

SQL dependency tracking across database modules is handled through a package management system that maps dependencies between changes, enabling modular development and reliable automated deployment.

Can I package and publish reusable SQL logic for PostgreSQL?

Yes, you can package and publish reusable SQL database logic as modules, allowing teams to share and integrate database functions, tables, and indexes across different projects.

How do I automate PostgreSQL schema deployment in a CI/CD pipeline?

PostgreSQL schema deployment is automated in CI/CD pipelines by applying pending database changes through deterministic migration scripts that support both deployment and automated reversion.

Does pgpm support local development workflows for PostgreSQL schema changes?

Yes, pgpm supports local development workflows by allowing developers to add and test database changes like tables and functions, ensuring they can be reliably deployed and reverted locally.

How do I revert a failed database migration in PostgreSQL?

A failed database migration in PostgreSQL is reverted using predefined revert scripts that safely undo schema changes, maintaining database integrity and allowing for reliable rollback.