FREEDOM251

Freedom251 › Database Migration Tools

pgroll

Free plan Open source LinuxMacSelf-hostedWindows

Visit pgroll Alternatives Pricing

pgroll's own site

What pgroll is

pgroll is an open-source command-line tool for PostgreSQL schema migrations that keeps old and new schema versions available while applications transition. Its expand/contract workflow lets clients select a version through PostgreSQL's search_path. The project describes migrations as zero-downtime and says changes are applied without locking the database; it can also backfill columns when needed. For breaking changes, pgroll creates virtual schemas using views over physical tables and triggers to propagate writes between old and new columns. An active migration can be rolled back to the previous schema version. It supports PostgreSQL 14 and later, including services such as RDS and Aurora, and is available for Linux, macOS, and Windows as well as self-hosted use. pgroll can convert SQL migration statements generated by ORMs, with examples for Alembic, Django, and Drizzle. Generated migrations may need manual up and down data migrations and SQL consolidation. On PostgreSQL 14, its versioned views do not respect row-level security policies. The project is licensed under Apache License 2.0 and is free.

Who it suits

pgroll suits teams that need to change PostgreSQL schemas while client applications transition between versions. It may be a poor fit for PostgreSQL 14 deployments that use row-level security.

What it does well

  • Keeps old and new schema versions available together.
  • Active migrations can be rolled back.
  • Automatically backfills columns when needed.
  • Supports PostgreSQL 14 and later.
  • Free and licensed under Apache License 2.0.

What to know first

  • PostgreSQL 14 versioned views do not respect RLS policies.
  • ORM-generated migrations may need manual data migrations.
  • ORM SQL may need consolidation into fewer operations.

Limits

pgroll supports PostgreSQL 14 and later. On PostgreSQL 14, versioned views do not respect row-level security policies; ORM-generated migrations may require manual up and down data migrations and SQL consolidation.

Plans

PlanBilled and limitsPrice
Open-sourcePostgreSQL 14.0 or later · single cross-platform binaryFree
Open sourcePostgreSQL 14+ · Linux, macOS and Windows binaries · self-managed CLIFree

As pgroll.com lists them, read 4 Oct 2026. The maker's own page has the final word.

Getting started

  1. Get the open-source pgroll cross-platform binary or use the self-hosted option.
  2. Use a PostgreSQL 14 or later database service.
  3. Prepare a migration, including any required manual up and down data migrations.
  4. Set each client application's PostgreSQL search_path to select its schema version.
  5. For ORM-generated SQL, consult the available examples for Alembic, Django, or Drizzle.

pgroll is an open-source command-line tool for teams changing PostgreSQL schemas while applications are still rolling out. It suits engineers who need reversible, low-disruption migrations and are comfortable operating database tooling themselves. Its strongest case is coordinated application and schema change; PostgreSQL 14 users relying on row-level security should choose another approach.

Overview

pgroll uses an expand/contract workflow so old and new schema versions remain usable at the same time. Client applications choose a version by setting PostgreSQL’s search_path when they connect, allowing an application rollout to move independently from the database change.

The tool is free and open source, with the repository licensed under Apache License 2.0. It runs as a single cross-platform binary and can be self-hosted. Questions and issue reports go through GitHub Issues, GitHub Discussions, or Discord rather than a commercial support desk.

Key features

Reversible, low-disruption migrations

pgroll describes its migrations as zero-downtime and applies changes without locking the database. An active migration can be rolled back to the previous schema version, which gives teams a practical escape route when a new application release misbehaves. Automatic column backfills reduce routine migration work when a change requires existing rows to receive values.

Virtual schemas and write propagation

For breaking changes, pgroll builds virtual schemas with views over physical tables and uses triggers to propagate writes between old and new columns. That design preserves compatibility during the transition, but it also introduces database objects and behavior that operators must understand before relying on them in production.

PostgreSQL and ORM coverage

pgroll supports PostgreSQL 14 and later and says it works with any PostgreSQL service, including Amazon RDS and Aurora. It can convert SQL migration statements produced by ORMs, with examples for Alembic, Django, and Drizzle. ORM output is not a hands-off path: the project’s guide requires manual up and down data migrations, and generated SQL may need to be consolidated into fewer pgroll operations.

Important PostgreSQL 14 caveat

On PostgreSQL 14, row-level security policies are not respected by pgroll’s versioned views. Teams using RLS on that release should treat pgroll as a poor fit, regardless of the appeal of reversible migrations.

Pricing

PlanPriceIncludes
Open-sourcefreePostgreSQL 14.0 or later; single cross-platform binary; rollback support; self-hosted option; mixed migration format

There are no paid tiers, seat charges, trial periods, or renewal terms in this plan. The trade-off is operational: you run the tool yourself and rely on the project’s community channels for help. It fits teams that can manage PostgreSQL migration infrastructure and want Apache-licensed software without a subscription.

Platforms

pgroll supports Linux, macOS, Windows, and self-hosted deployments. Its stated database target is PostgreSQL 14 and later, including managed services such as RDS and Aurora.

Who it's for

Choose pgroll when a PostgreSQL-backed application needs schema changes staged across releases, especially when rollback and simultaneous schema versions matter. It is well suited to engineering teams that control deployment and connection settings and can review SQL generated by their ORM.

Look elsewhere if your PostgreSQL 14 deployment depends on row-level security, or if you want migrations fully generated and maintained by an ORM without manual data steps and SQL consolidation. The self-hosted, command-line model also favors teams comfortable owning operations rather than buyers seeking a managed service.

Pros and cons

  • Pros: Reversible active migrations provide a direct recovery path during application rollout.
  • Pros: Expand/contract versioning keeps old and new clients working concurrently.
  • Pros: Automatic column backfills and trigger-based write propagation address common breaking-change mechanics.
  • Pros: Free Apache 2.0 software runs across major desktop platforms and self-hosted environments.
  • Cons: PostgreSQL 14 versioned views do not respect row-level security policies.
  • Cons: ORM-generated migrations still require manual up and down data migrations and possible SQL consolidation.
  • Cons: Operating a command-line, self-hosted tool leaves deployment and support responsibility with your team.

Alternatives

For a broader directory of migration choices, see Database Migration Tools; for validation and testing-oriented products, see Database Testing Tools.

  • Amazon Deequ is a free Apache 2.0 library for data quality checks, but it requires Apache Spark and a matching release.
  • DataKitchen TestGen offers a free forever open-source plan with one user, one connection, and one project, making it a better fit for bounded test environments.
  • Atlas is an open-core migration tool whose core engine is Apache 2.0 licensed, with advanced features in proprietary tiers.
  • Great Expectations focuses on data expectations; its Developer plan is free for up to five data assets under test monthly and three users.
  • HammerDB is free, open-source database benchmarking software for Windows and Linux, not a schema rollout workflow.
  • Soda provides freemium pipeline testing, metrics observability, and alerting rather than pgroll’s versioned migration mechanism.
  • Sqitch is a free database change-management application when you want a permissively usable migration tool without pgroll’s virtual-schema approach.
  • SQLancer is a free MIT-licensed tool for database testing, suited to finding database bugs rather than coordinating application schema versions.

Verdict

pgroll is a strong choice for PostgreSQL teams that need reversible, zero-downtime-style schema rollouts and can operate a self-hosted command-line tool. Its main reason to choose it is simultaneous old/new schema compatibility with rollback; its main reason to look elsewhere is the PostgreSQL 14 row-level-security failure and the manual work left around ORM migrations.

Verdict

pgroll provides a reversible migration workflow for PostgreSQL and keeps schema versions available during application rollout. Check its PostgreSQL 14 row-level security limitation and the manual work that ORM-generated migrations may require.

Questions

Is pgroll free?

Yes. The open-source plan is listed as free and is licensed under Apache License 2.0.

Which PostgreSQL versions does pgroll support?

It supports PostgreSQL 14 and later and says it works with any PostgreSQL service, including RDS and Aurora.

Which platforms are available?

The cross-platform binary supports Linux, macOS, and Windows. A self-hosted option is also available.

Can pgroll roll back a migration?

Yes. An active migration can be rolled back to the previous schema version.

Can it work with ORM-generated migrations?

It can convert SQL migration statements generated by ORMs, with examples for Alembic, Django, and Drizzle. The resulting migrations may need manual data migrations and SQL consolidation.

What should PostgreSQL 14 users know about row-level security?

On PostgreSQL 14, pgroll's versioned views do not respect row-level security policies.

Facts from pgroll's own pages

Automatic backfills
The tool backfills existing rows in batches when a migration requires data conversion. · xata.io, 15 Oct 2026
Backfills
pgroll automatically backfills columns when needed. · github.com, 4 Oct 2026
Benchmarks
The project runs benchmarks across PostgreSQL 14 through 18 and measures backfill, trigger write amplification and schema reads. · github.com, 15 Oct 2026
Client configuration
Client applications select a schema version by setting PostgreSQL's search_path when connecting. · github.com, 4 Oct 2026
Client integration
Applications select a schema version by setting PostgreSQL search_path when connecting. · github.com, 15 Oct 2026
CLI installation
Prebuilt binaries are offered for Linux, macOS and Windows, with source installation through go install. · github.com, 15 Oct 2026
Company founded
LinkedIn lists Xata.io as founded in 2020. · linkedin.com, 15 Oct 2026
Company headquarters
LinkedIn lists Xata.io headquarters in San Francisco. · linkedin.com, 15 Oct 2026
Company ownership
LinkedIn describes Xata.io as privately held. · linkedin.com, 15 Oct 2026
Company size
LinkedIn lists Xata.io as having 11–50 employees. · linkedin.com, 15 Oct 2026
Connection-leak fix
Release 0.16.1 fixed connection leaks in the migration backfill process. · github.com, 15 Oct 2026
Database compatibility
pgroll supports PostgreSQL versions 14 and later and says it works with any PostgreSQL service, including RDS and Aurora. · github.com, 4 Oct 2026
Documentation
Documentation includes getting started material, tutorials, guides, examples and command references. · github.com, 15 Oct 2026
Downtime
The project describes migrations as zero-downtime and says changes are applied without locking the database. · github.com, 4 Oct 2026
Existing databases
A baseline command imports the structure of an already populated database before migrations begin. · github.com, 15 Oct 2026
Expand-contract workflow
Migrations follow an expand-and-contract lifecycle, retaining compatibility until clients move to the new schema. · xata.io, 15 Oct 2026
Homebrew architectures
Homebrew bottles cover macOS Apple Silicon, macOS Intel and Linux ARM64 or x86_64. · formulae.brew.sh, 15 Oct 2026
Homebrew package
Homebrew provides a pgroll formula with brew install pgroll. · formulae.brew.sh, 15 Oct 2026
Homebrew version
The Homebrew page lists stable version 0.16.3. · formulae.brew.sh, 15 Oct 2026
How it works
It creates virtual schemas using views over physical tables and uses triggers to propagate writes between old and new columns during breaking changes. · github.com, 4 Oct 2026
Instant rollback
Rollback removes the new schema version while leaving the previous version available. · github.com, 15 Oct 2026
Latest release
Release 0.16.3 was published on September 8, 2026 and mainly updates dependencies and formatting. · github.com, 15 Oct 2026
License
The repository is licensed under Apache License 2.0. · github.com, 15 Oct 2026
Limit: JSON workflow
Reddit commenters criticized the JSON migration DSL for verbosity, weak comments and awkward SQL mapping. · reddit.com, 15 Oct 2026

Where pgroll stands on Freedom251

Look at these too