Releases: xataio/pgroll
v0.16.1
v0.16.0
🔴 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
# optionsThis 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
v0.15.0
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-oneflag tomigratecommand (#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
v0.14.2
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-prefixesflag from thepullcommand (#964) - d8fb553 Update init.sql placeholder references (#969)
- fb00928 chore: fix inconsistent struct name in comment (#955)
v0.14.1
v0.14.0
⚡ 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
--yesflag topgroll baseline(#865) - 050e2ea Add
VersionSchemafield to operation integration tests (#886) - a90b587 Add
pgroll latest urlcommand (#927) - 1fb32c8 Add a global
--use-version-schemaflag to thepgrollCLI (#919) - a7c4bb5 Add coverage job again (#868)
- 6c32984 Add coverage report to pull requests (#864)
- 5cbaa73 Add documentation for the
pgroll latest urlcommand (#928) - 063a244 Add more details to
updatesubcommand page (#877) - fe34c2c Add new
DBActionto add columns to existing tables (#894) - 934a20e Add new
DBActionto rename tables (#893) - f672053 Add new
DBAction:RenameDuplicatedColumnAction(#883) - b533a14 Add new
DBActionsfor 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
SchemaAfterMigrationmethod (#926) - 5b3c948 Add trigger configuration to
backfill.Task(#931) - 1dd00ff Allow migration files to specify a
versionSchemafield (#884) - 899645a Always remove version schema on rollback and complete (#920)
- 68b779b Bump
golangci-linttov2(#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
Startinto a single data class (#945) - aac8b31 Comment out coverage check, so we get a baseline (#867)
- 542166f Construct version schema name in
Roll.StartDDLOperationswithout DB lookup (#912) - 07d8d08 Ensure lex ordering of inferred migration names with respect to
pgrollmigrations (#899) - 146d740 Ignore all DDL executed by
pgroll(#890) - 192f4eb Keep
pgrollstate schema in sync withpgrollbinary version (#876) - 589bc33 Make
pgroll latest schemaignore migrations for which no version schema exists (#916) - 31dd8d1 Move
Statusmethod torollpackage (#921) - b6c7a94 Move
TriggerConfigtobackfillpackage (#923) - 22d7cc2 New
DBActionfor adding unique constraints using indices (#897) - 535abb3 New
DBActionfor creating index concurrently (#939) - e01a51f New
DBActionfor setting replica identity (#938) - d2a1212 New
DBActionto create primary key constraint from index (#901) - 711b4d4 New
DBActionto run raw SQL statements (#898) - 44e4e00 New
DBAction:SetNotNullAction(#878) - 0ac2095 Remove
Ensure JSON examples are formattedCI step (#873) - a75c3f6 Remove
State.LastSchemamethod (#909) - e7786f5 Remove
WithNoVersionSchemaForRawSQLopton (#903) - 2150959 Remove
examples-schema-validationCI build step (#874) - 1fe1af8 Remove redundant check from
MissingMigrationsmethod (#911) - 7f44302 Remove redundant check from
UnappliedMigrationsmethod (#869) - 716f47f Remove redundant parameter from
previous_migrationfunction (#914) - 6dfeb32 Remove unnecessary param from
Startfunction (#934) - 3532502 Rename
WithDisableViewsManagementroll option (#917) - c3c73e4 Rename
pgroll.internalGUC topgroll.no_inferred_migrations(#932) - d7f2f61 Return
DBActionsfromComplete(#902) - 12dd5a2 Return
DBActionsfromRollback(#929) - b117582 Return
backfill.TaskfromStartphase operations (#924) - 470b5ef Return list of
DBActionfromStart(#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_migrationfunction (#922) - 7b932e9 Split pgroll latest (#861)
- be1a7cf Support altering primary key columns that are not included in FK constraints (#930)
- bc40891 Turn
Duplicatorinto aDBAction(#937) - 4971378 Update
pgroll latestto take account of migrationversion_schema(#896) - 1e4ed72 Update docs for new
versionSchemafield (#887) - 6218ca4 Update docs with
backfill-batch-delayandbackfill-batch-sizeoptions (#881) - c74a242 Update error type returned when
Roll.LatestVersionRemotefinds no version schema (#918) - 6f73c9e Use DropIndexAction when rolling back index creation (#891)
- 9535bc2 Use
DropFunctionActionin remaning operations (#880) - 803868a Use
jsonb_strip_nullsinread_schemafunction (#925) - fcda88a Use existing dbactions in
op_alter_column(#879)
v0.13.0
⚡ Highlights
- 🦆 New command:
baselineto help integratepgrollinto existing databases - 🦧
migratecommand 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
- 🎏
--nameflag is removed frompgroll convert - 🐰 From now on
pgrolluses the filename as the migration name. This, migration name cannot be set usingnameattribute in migration files. You must remove the attributenamefrom 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-composesetup (#824) - 16173dd Document new constraint type in
create_constraint:primary_key(#839) - 99819d6 Fail early in
migrateif there is an incompatible migration file (#827) - 9fb0548 Fix JSON example in
create_constraintdocumentation page (#840) - 5c0101b Fix backfill on tables with case sensitive names (#831)
- 1b31daa Mark hidden commands in
build-cli-definitiontool (#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
--nameflag frompgroll convert(#851) - 2982cf7 Remove redundant
pgroll.internalparameter (#823) - 3160548 Remove support for the
namefield in migrations (#852) - 034cb1e Simplify README.md (#825)
- 27f9da6 Stop setting
namefield for inferred migrations (#854) - 7241a55 Use
DropTableActionincreate_tableoperation (#836) - 2aee64f [baseline] Add
pgroll baselinecommand (#832) - 4d9bc1b [baseline] Add docs for the
pgroll baselinecommand (#844) - 32bfe51 [baseline] Make
pgroll migratebaseline-aware (#834) - 149d0ce [baseline] Make
pgroll pullpull only migrations after the most recent baseline (#833) - 50d690a [baseline] Make
startandmigratefail on non-empty schema without migration histories (#835) - 0290c11 [baseline] Unhide the
pgroll baselinecomand (#846)
v0.12.0
⚡ Highlights
- 🪐 New command:
createto create migrations interactively - 🐃 New flag
--verboseis added to migrator commands (start,complete,rollbackandmigrate) - 🎍
pullfetches 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
migratecommand no longer fails if there is an ongoing migration in your databasepullcommand 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
createsubcommand (#820) - b77c05c Add logger interface for migrations and implement it (#807)
- 34c19af Add new command:
createto 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 pullto write in YAML format and add a--jsonflag (#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
migratecommand (#805) - d697c70 Implement dropping indexes as
DBAction(#793) - 07ba13c Implement dropping tables as
DBAction(#794) - 542db44 Make
pgroll pullandpgroll migratecommand able to handle incompatible migration file formats (#812) - dc239eb Make
pgroll pullpull only migrations that don't exist in target directory (#811) - 7f979fe New constraint type in
create_constraint:primary_key(#698) - 7669ae2 Remove
namefield 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_godependency to fix compilation on MacOS 15.4 (#799)
v0.11.1
⚡ 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