Skip to content

Releases: xataio/pgroll

v0.4.4

08 Dec 16:04
e3faa35
Compare
Choose a tag to compare

Changelog

  • 3924fd0 Fix backfills for tables with character-type valued primary keys (#213)
  • 788bac6 Add JSON schema struct generation (#210)
  • 5812acc Support build docker image (#209)

v0.4.1

24 Nov 15:31
323fc5f
Compare
Choose a tag to compare

🐛 The pgroll status command now correctly defaults to the public schema and respects the --schema flag.

Changelog

  • 763dabc Move logic for the status command into the state and migrations packages (#205)
  • 323fc5f Quote table name in OpSetReplicaIdentity (#206)
  • 34bbb24 Show the status for the correct schema (#204)

v0.4.0

08 Nov 16:06
7f20c15
Compare
Choose a tag to compare
  • 🔒 Versioned views are now created with security_invoker=true on Postgres >=15 in order to respect row level security policies on the underlying tables. See the README section for more details.
  • 🔁 Added a new SET REPLICA IDENTITY operation. See the docs for details.
  • 🐛 Old version schemas are now removed correctly when working in schemas other than public.
  • 🐛 Old version schemas are now removed correctly when a DDL change was captured in between migrations.
  • 🔒 Made some internal functions in the pgroll schema run as security_definer.
  • 🟢 Ping after establishing the postgres connection for cleaner error messages on connection failures.
  • 🚤 Made some performance improvements in the read_schema internal function to better handle databases with many schemas.

Changelog

  • 536295b Add SECURITY DEFINER to internal functions (#191)
  • 4f4d549 Add a 'set replica identity' operation (#201)
  • 7f20c15 Add section to README about RLS in Postgres 14 (#202)
  • bd53d10 Create versioned views WITH (security_invoker = true) (#189)
  • d486aab Fix previous_version function to work with non-public schema (#190)
  • c029d5e Fix previous version detection in the presence of inferred DDL migrations (#197)
  • 954746b Fix primary keys retrieval query (#198)
  • 2429a6b Ping after creating connection (#195)
  • edc78ac Stop quoting column default values (#200)

v0.3.0

13 Oct 14:18
8e49d69
Compare
Choose a tag to compare
  • 🍺 pgroll can now be installed using brew. See the install section in README.md.
  • 🔴 We've made a breaking change to the format of "alter_column" migrations that set NOT NULL constraints: the not_null field has been renamed to nullable. A migration that used to look like this:
{
  "name": "16_set_nullable",
  "operations": [
    {
      "alter_column": {
        "table": "reviews",
        "column": "review",
        "not_null": true,
        "up": "(SELECT CASE WHEN review IS NULL THEN product || ' is good' ELSE review END)",
        "down": "review"
      }
    }
  ]
}

should now be written as:

{
  "name": "16_set_nullable",
  "operations": [
    {
      "alter_column": {
        "table": "reviews",
        "column": "review",
        "nullable": false,  <-- field name has changed and logic inverted
        "up": "(SELECT CASE WHEN review IS NULL THEN product || ' is good' ELSE review END)",
        "down": "review"
      }
    }
  ]
}

❤️ Thanks to first-time contributors @sFritsch09 and @pucke-uninow for their work on this release.

Changelog

v0.2.1

06 Oct 14:07
a24eeef
Compare
Choose a tag to compare
  • 🔗 Disable CGO: pgroll binaries are now statically linked (#176)

v0.2.0

03 Oct 07:37
f50c7f8
Compare
Choose a tag to compare

New features:

  • 🔓 Backfill in batches to avoid locking out updates to modified tables during the start phase. (#137)
  • ⌛ Set Postgres' lock_timeout for pgroll DDL operations. (#155)
  • 🛼 A --version flag to report the version of the pgroll CLI (#148)
  • 🐍 Allow pgroll 's top-level CLI flags to be set via environment variables (#152)

v0.1.0

22 Sep 11:21
803fbf8
Compare
Choose a tag to compare

Initial Release

pgroll is an open source command-line tool that offers safe and un-doable schema migrations for PostgreSQL by serving multiple schema versions simultaneously. It takes care of the complex migration operations to ensure that client applications continue working while the database schema is being updated. This includes ensuring changes are applied without locking the database, and that both old and new schema versions work simultaneously (even when breaking changes are being made!). This removes risks related to schema migrations, and greatly simplifies client application rollout, also allowing for instant rollbacks.

See the README for details and usage instructions.