Open5

[2023/10/04]気になったニュース

ikeponikepon

Introducing pgroll: zero-downtime, reversible, schema migrations for Postgres

We are excited to ship the first version of pgroll, a command line tool that offers safe and reversible schema migrations for PostgreSQL

Postgre の schema migration の command line tool
4つの特徴

Migrations are defined in a high-level JSON format: Simple definition, allowing for richer operations information on top of Postgres DDL statements (CREATE, ALTER, etc.)
Keep two versions of the schema (previous and next) accessible at the same time during the whole migration process: Previous versions of the applications will still work while the migration is happening, taking risk and pressure away from the deployment process.
Instant rollbacks: Since the previous version of the schema is kept alive, a rollback basically means canceling the migration; the previous schema never went away!
Zero downtime: All operations are implemented to ensure that Postgres won’t lock data access to the table while the schema changes are happening.