Skip to content

Releases: xataio/pgroll

v0.16.1

17 Feb 08:48
0a64836

Choose a tag to compare

Fixes

⚙️ This release eliminates connection leaks during the backfilling process of migrate (#1020)

Changelog

v0.16.0

05 Jan 09:37
aee9741

Choose a tag to compare

🔴 Breaking changes

The create_index operation has changed to take the list of columns covered by the index as a list instead of a map:

Old format:

operations:
  - create_index:
      name: some-index
      table: tickets
      columns:
        column1: {}
        column2: {}

New format:

operations:
- create_index:
    name: some-index
    table: tickets
    columns:
    - column: column1
      # options
    - column: column2
      # options

This is to ensure that the ordering of columns within in an index is stable (#1001).

This is a breaking change to the migration format. Use the pgroll update command to convert migrations containing create_index operations in the old format to use the new format, eg:

pgroll update migrations/

Changelog

  • aee9741 Fix create_index operation column ordering (#1009)

v0.15.0

10 Dec 12:56
1a3880f

Choose a tag to compare

Features

🦺 The pgroll migrate command has a new --expect-one flag used to abort if there is more than one migration to be applied

Changelog

  • 1a3880f Add --expect-one flag to migrate command (#1005)
  • 82cb94e Add and update badges on README.md (#991)
  • 6222c9c Bump github.com/spf13/viper from 1.20.1 to 1.21.0 (#975)
  • e237e63 Bump github.com/testcontainers/testcontainers-go from 0.38.0 to 0.39.0 (#981)
  • c56416b Bump golang.org/x/tools from 0.36.0 to 0.37.0 (#978)
  • 07bb247 Bump golang.org/x/tools from 0.37.0 to 0.38.0 (#986)
  • d436c48 Correct formatting and links in orms.mdx (#990)
  • dc397a2 Improve error message on binary/state mismatch (#982)
  • dab432e Run CI tests against Postgres 18 (#983)
  • f237c88 chore: fix small typo in orms.mdx (#992)

v0.14.3

23 Sep 14:59
9337e0d

Choose a tag to compare

Fixes

⚙️ This release resolves a regression with pgroll's handling of GENERATED columns (#965)

Changelog

  • 9337e0d Stop storing column defaults for GENERATED columns (#979)

v0.14.2

08 Sep 11:39
d8fb553

Choose a tag to compare

Fixes

⚙️ This patch release resolves occasional 'function not found' errors on pgroll initialization (#947)

Changelog

  • 0794b54 Add simple coordinator for executing DBActions (#940)
  • fc97adf Bump github.com/docker/docker from 28.2.2+incompatible to 28.3.3+incompatible (#961)
  • 0b2dc9b Bump github.com/go-viper/mapstructure/v2 from 2.3.0 to 2.4.0 (#968)
  • bf168cb Bump github.com/spf13/cobra from 1.9.1 to 1.10.1 (#973)
  • 41a3a9a Bump github.com/spf13/pflag from 1.0.6 to 1.0.7 (#958)
  • dafb650 Bump github.com/spf13/pflag from 1.0.7 to 1.0.9 (#972)
  • d0470f4 Bump github.com/stretchr/testify from 1.10.0 to 1.11.1 (#974)
  • 3ae9f74 Bump github.com/testcontainers/testcontainers-go/modules/postgres from 0.37.0 to 0.38.0 (#960)
  • bd440c6 Bump golang.org/x/mod from 0.26.0 to 0.27.0 (#962)
  • 4210650 Bump golang.org/x/tools from 0.34.0 to 0.35.0 (#950)
  • 41809ac Bump golang.org/x/tools from 0.35.0 to 0.36.0 (#963)
  • 0f9c721 Bump sigs.k8s.io/yaml from 1.5.0 to 1.6.0 (#957)
  • c9d2566 Make column duplication idempotent (#946)
  • 06346a6 Re-enable pgformatter (#952)
  • b884976 Remove the --with-prefixes flag from the pull command (#964)
  • d8fb553 Update init.sql placeholder references (#969)
  • fb00928 chore: fix inconsistent struct name in comment (#955)

v0.14.1

11 Jul 12:08
a906776

Choose a tag to compare

Fixes

🐛 This release fixes the broken upgrade path to v0.14 from older pgroll versions.

Changelog

v0.14.0

04 Jul 11:38
92bb10a

Choose a tag to compare

⚡ Highlights

✅ Validate migrations before execution with the new pgroll validate command
⚙️ Auto update migration files with the new pgroll update command
📁 Get the connection string for the most recent version schema with the newpgroll latest url command
📛 Specify version schema names with the version_schema field or run without them with the --use-version-schema flag

Read the release blog post for more details: https://pgroll.com/blog/pgroll-0-14-0-update

Changelog

  • 63a8f4b Add --yes flag to pgroll baseline (#865)
  • 050e2ea Add VersionSchema field to operation integration tests (#886)
  • a90b587 Add pgroll latest url command (#927)
  • 1fb32c8 Add a global --use-version-schema flag to the pgroll CLI (#919)
  • a7c4bb5 Add coverage job again (#868)
  • 6c32984 Add coverage report to pull requests (#864)
  • 5cbaa73 Add documentation for the pgroll latest url command (#928)
  • 063a244 Add more details to update subcommand page (#877)
  • fe34c2c Add new DBAction to add columns to existing tables (#894)
  • 934a20e Add new DBAction to rename tables (#893)
  • f672053 Add new DBAction: RenameDuplicatedColumnAction (#883)
  • b533a14 Add new DBActions for setting and dropping default values (#892)
  • c3fddb3 Add new subcommand to update migrations that contain breaking changes (#855)
  • f8bf96f Add new subcommand to validate migration files (#856)
  • ebd41aa Add tests for SchemaAfterMigration method (#926)
  • 5b3c948 Add trigger configuration to backfill.Task (#931)
  • 1dd00ff Allow migration files to specify a versionSchema field (#884)
  • 899645a Always remove version schema on rollback and complete (#920)
  • 68b779b Bump golangci-lint to v2 (#904)
  • 531a919 Bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.3.0 (#941)
  • 25fe03e Bump github.com/pterm/pterm from 0.12.80 to 0.12.81 (#870)
  • 21589af Bump github.com/santhosh-tekuri/jsonschema/v6 from 6.0.1 to 6.0.2 (#857)
  • f028dc3 Bump golang.org/x/tools from 0.33.0 to 0.34.0 (#871)
  • 914582b Bump sigs.k8s.io/yaml from 1.4.0 to 1.5.0 (#942)
  • 92bb10a Combine the return values of Start into a single data class (#945)
  • aac8b31 Comment out coverage check, so we get a baseline (#867)
  • 542166f Construct version schema name in Roll.StartDDLOperations without DB lookup (#912)
  • 07d8d08 Ensure lex ordering of inferred migration names with respect to pgroll migrations (#899)
  • 146d740 Ignore all DDL executed by pgroll (#890)
  • 192f4eb Keep pgroll state schema in sync with pgroll binary version (#876)
  • 589bc33 Make pgroll latest schema ignore migrations for which no version schema exists (#916)
  • 31dd8d1 Move Status method to roll package (#921)
  • b6c7a94 Move TriggerConfig to backfill package (#923)
  • 22d7cc2 New DBAction for adding unique constraints using indices (#897)
  • 535abb3 New DBAction for creating index concurrently (#939)
  • e01a51f New DBAction for setting replica identity (#938)
  • d2a1212 New DBAction to create primary key constraint from index (#901)
  • 711b4d4 New DBAction to run raw SQL statements (#898)
  • 44e4e00 New DBAction: SetNotNullAction (#878)
  • 0ac2095 Remove Ensure JSON examples are formatted CI step (#873)
  • a75c3f6 Remove State.LastSchema method (#909)
  • e7786f5 Remove WithNoVersionSchemaForRawSQL opton (#903)
  • 2150959 Remove examples-schema-validation CI build step (#874)
  • 1fe1af8 Remove redundant check from MissingMigrations method (#911)
  • 7f44302 Remove redundant check from UnappliedMigrations method (#869)
  • 716f47f Remove redundant parameter from previous_migration function (#914)
  • 6dfeb32 Remove unnecessary param from Start function (#934)
  • 3532502 Rename WithDisableViewsManagement roll option (#917)
  • c3c73e4 Rename pgroll.internal GUC to pgroll.no_inferred_migrations (#932)
  • d7f2f61 Return DBActions from Complete (#902)
  • 12dd5a2 Return DBActions from Rollback (#929)
  • b117582 Return backfill.Task from Start phase operations (#924)
  • 470b5ef Return list of DBAction from Start (#944)
  • d8ce04e Revert "Bump github.com/pterm/pterm from 0.12.80 to 0.12.81 (#870)" (#875)
  • 2293fdd Set default values for columns in new schema version views (#860)
  • c1b0f90 Simplify previous_migration function (#922)
  • 7b932e9 Split pgroll latest (#861)
  • be1a7cf Support altering primary key columns that are not included in FK constraints (#930)
  • bc40891 Turn Duplicator into a DBAction (#937)
  • 4971378 Update pgroll latest to take account of migration version_schema (#896)
  • 1e4ed72 Update docs for new versionSchema field (#887)
  • 6218ca4 Update docs with backfill-batch-delay and backfill-batch-size options (#881)
  • c74a242 Update error type returned when Roll.LatestVersionRemote finds no version schema (#918)
  • 6f73c9e Use DropIndexAction when rolling back index creation (#891)
  • 9535bc2 Use DropFunctionAction in remaning operations (#880)
  • 803868a Use jsonb_strip_nulls in read_schema function (#925)
  • fcda88a Use existing dbactions in op_alter_column (#879)

v0.13.0

27 May 10:05
27f9da6

Choose a tag to compare

⚡ Highlights

  • 🦆 New command: baseline to help integrate pgroll into existing databases
  • 🦧 migrate command fails early if there is an issue in a migration file

Read the release blog post for more details: https://pgroll.com/blog/pgroll-0-13-0-update

🔴 Breaking changes

  • 🎏 --name flag is removed from pgroll convert
  • 🐰 From now on pgroll uses the filename as the migration name. This, migration name cannot be set using name attribute in migration files. You must remove the attribute name from your new, unapplied migration files.

Changelog

  • db2a61f Add missing documentation link from README badge (#828)
  • 4e909cf Add test coverage for ReadMigration (#853)
  • d4f007b Change local docker-compose setup (#824)
  • 16173dd Document new constraint type in create_constraint: primary_key (#839)
  • 99819d6 Fail early in migrate if there is an incompatible migration file (#827)
  • 9fb0548 Fix JSON example in create_constraint documentation page (#840)
  • 5c0101b Fix backfill on tables with case sensitive names (#831)
  • 1b31daa Mark hidden commands in build-cli-definition tool (#847)
  • 675bfd2 New DBAction: AlterSequenceOwnerAction (#848)
  • a149a4f New DBAction: CreateCheckConstraintAction (#837)
  • 529d721 New DBAction: CreateFKConstraintAction (#843)
  • df51a33 New DBAction: DropConstraintAction (#849)
  • cabb623 New DBAction: ValidateConstraintAction (#838)
  • cc8fa32 Refactoring of writing migrations to file (#821)
  • 052ab79 Remove --name flag from pgroll convert (#851)
  • 2982cf7 Remove redundant pgroll.internal parameter (#823)
  • 3160548 Remove support for the name field in migrations (#852)
  • 034cb1e Simplify README.md (#825)
  • 27f9da6 Stop setting name field for inferred migrations (#854)
  • 7241a55 Use DropTableAction in create_table operation (#836)
  • 2aee64f [baseline] Add pgroll baseline command (#832)
  • 4d9bc1b [baseline] Add docs for the pgroll baseline command (#844)
  • 32bfe51 [baseline] Make pgroll migrate baseline-aware (#834)
  • 149d0ce [baseline] Make pgroll pull pull only migrations after the most recent baseline (#833)
  • 50d690a [baseline] Make start and migrate fail on non-empty schema without migration histories (#835)
  • 0290c11 [baseline] Unhide the pgroll baseline comand (#846)

v0.12.0

09 May 12:56
a8ab934

Choose a tag to compare

⚡ Highlights

  • 🪐 New command: create to create migrations interactively
  • 🐃 New flag --verbose is added to migrator commands (start, complete, rollback and migrate)
  • 🎍 pull fetches only migrations that do not exist in the target migrations folder

Read the release blog post for more details: https://pgroll.com/blog/pgroll-0-12-0-update

🔴 Breaking changes

  • migrate command no longer fails if there is an ongoing migration in your database
  • pull command outputs migration files in YAML instead of JSON. If you want to stick with JSON files, set the flag --json

Thank you for reporting issues and suggesting improvements!

Changelog

  • 49bf500 Add an extra test case for missing local migrations (#818)
  • a8ab934 Add documentation for create subcommand (#820)
  • b77c05c Add logger interface for migrations and implement it (#807)
  • 34c19af Add new command: create to add new migrations (#815)
  • 9249605 Add new guide to documentation: Use pgroll with ORMs (#816)
  • 94a5e7f Add new page to documentation titled "Why use pgroll?" (#806)
  • 0acb636 Add verbose logging (#804)
  • ecdc59d Bump github.com/testcontainers/testcontainers-go from 0.36.0 to 0.37.0 (#802)
  • b74a551 Bump github.com/testcontainers/testcontainers-go/modules/postgres from 0.36.0 to 0.37.0 (#803)
  • 07c6ff7 Bump golang.org/x/tools from 0.31.0 to 0.32.0 (#792)
  • 0d3f57d Bump golang.org/x/tools from 0.32.0 to 0.33.0 (#813)
  • e028d24 Default pgroll pull to write in YAML format and add a --json flag (#810)
  • 8db5ad7 Extract Concepts to left menu (#797)
  • 481e5a7 Extract Installation to the left menu (#796)
  • fcf713e Fix formatting of log message args in verbose mode (#817)
  • f1c7805 Idempotent migrate command (#805)
  • d697c70 Implement dropping indexes as DBAction (#793)
  • 07ba13c Implement dropping tables as DBAction (#794)
  • 542db44 Make pgroll pull and pgroll migrate command able to handle incompatible migration file formats (#812)
  • dc239eb Make pgroll pull pull only migrations that don't exist in target directory (#811)
  • 7f979fe New constraint type in create_constraint: primary_key (#698)
  • 7669ae2 Remove name field from all examples (#801)
  • 02b1da7 Remove duplicated initialization checks across subcommands (#819)
  • 0044c10 Remove section about client application from front page of the docs (#808)
  • 445696d Rewrite the front page of the docs (#809)
  • 55cf3a8 Update pg_query_go dependency to fix compilation on MacOS 15.4 (#799)

v0.11.1

14 Apr 12:05
3922f45

Choose a tag to compare

⚡ Highlights

🔍 Column comments and default values are preserved when a table is created in a multi-operation migration
🛹 Valid SQL statement is generated when duplicating columns during multi-operation migrations

Changelog

  • 95d8794 Add JSON docs back with tabs (#787)
  • 3922f45 Add missing attributes to column info in virtual schema (#789)
  • 08c7e01 Pass all column attributes to new temporary column when adding a new one to the table (#788)

Full Changelog: v0.11.0...v0.11.1