# pgroll PostgreSQL Zero-Downtime Schema Migration

> pgroll is an open-source CLI tool by Xata that performs zero-downtime, reversible schema migrations for PostgreSQL. It uses the expand-and-contract pattern to keep old and new schema versions running simultaneously with automatic backfilling and instant rollback.

- Skill: `agentskillexchange/pgroll-postgresql-zero-downtime-schema-migration` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/pgroll-postgresql-zero-downtime-schema-migration`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/pgroll-postgresql-zero-downtime-schema-migration/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/pgroll-postgresql-zero-downtime-schema-migration

---


# pgroll PostgreSQL Zero-Downtime Schema Migration

pgroll is an open-source CLI tool by Xata that performs zero-downtime, reversible schema migrations for PostgreSQL. It uses the expand-and-contract pattern to keep old and new schema versions running simultaneously with automatic backfilling and instant rollback.

## Installation

Use the upstream install or setup path that matches your environment:
- go install github.com/xataio/pgroll@latest
- brew tap xataio/pgroll
- brew install pgroll

Requirements and caveats from upstream:
- Note: requires [Go 1.24](https://golang.org/doc/install) or later.

Basic usage or getting-started notes:
- [Usage](#usage)
- ### Binaries
- Binaries are available for Linux, macOS & Windows, check our [Releases](https://github.com/xataio/pgroll/releases).

- Source: https://github.com/xataio/pgroll
- Extracted from upstream docs: https://raw.githubusercontent.com/xataio/pgroll/HEAD/README.md

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/pgroll-postgresql-zero-downtime-schema-migration/)

