Databases & Storage

pglifecycle 2.0 beta released as Rust-based schema management tool

Key Takeaway

pglifecycle is an open source tool that manages PostgreSQL schemas using structured YAML files for version control.

Summary

The pglifecycle 2.0 beta has been released, marking a major rewrite of the tool in Rust. This schema management utility allows users to maintain PostgreSQL objects like tables, views, and functions as individual YAML files. It supports pulling existing databases into projects, generating DDL for reconciliation, and integrates with GitHub Actions to detect schema drift.

Technical features of pglifecycle 2.0

  • Rust rewrite: Version 2 is a complete rewrite of the original tool in Rust.
  • YAML-based schema: Stores database objects (tables, views, functions, roles) as individual structured YAML files.
  • Deployment safety: Generates deployment plans first and withholds destructive changes unless explicitly permitted.
  • CI/CD integration: Includes a GitHub Action to detect schema drift and post deployment plans to pull requests.
  • Reconciliation: Can compare a project against a live database to generate necessary DDL.

Why it matters

The tool provides a way to manage database evolution through version control without relying solely on long migration histories.

Original reference: www.postgresql.org →