Releases: xataio/pgroll
v0.4.4
- 🐳
pgroll
docker images are now available at https://github.com/xataio/pgroll/pkgs/container/pgroll - 🐛 Fix backfilling for tables with character-type primary keys
Changelog
v0.4.1
🐛 The pgroll status
command now correctly defaults to the public
schema and respects the --schema
flag.
Changelog
v0.4.0
- 🔒 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 assecurity_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
- 🍺
pgroll
can now be installed usingbrew
. See the install section in README.md. - 🔴 We've made a breaking change to the format of
"alter_column"
migrations that setNOT NULL
constraints: thenot_null
field has been renamed tonullable
. 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
- f15931e Add
.env
to.gitignore
(#178) - 0792d6b Bump golang.org/x/net from 0.10.0 to 0.17.0 (#185)
- 0fb46f2 Change signature of
migrations.ReadMigrationFile
(#177) - e87c639 Feat/#175 homebrew release (#180)
- 57ea814 Mark releases as draft (#186)
- 8e49d69 Remove unnecessary env section from release job (#188)
- a3a40f7 Update goreleaser release job (#187)
- 80adbae fix(#132): consistent naming for nullable columns in migration files (#181)
v0.2.1
v0.2.0
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 thepgroll
CLI (#148) - 🐍 Allow
pgroll
's top-level CLI flags to be set via environment variables (#152)
v0.1.0
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.