v0.6.0
β‘ Highlights
πͺ Add support for 'hooks' so that users using pgroll
as a Go module can customize its behaviour (#290, #335)
π₯ Backoff and retry DDL and DML operations on lock_timeout
errors (#353)
π Run all DDL operations before running any DML (data backfills) during migration start (#289)
βοΈ Support changing multiple column properties in one alter_column
operation (#338)
ποΈ Support rewriting or rejecting user-defined SQL using transformers when using pgroll
as a Go module (#329, #332).
π«± Allow changing column default values (#346)
π Support for renaming constraints. (#293)
β
Allow raw SQL migrations to be run on migration completion instead of start (#280).
π Allow setting the ON DELETE
behaviour of foreign key constraints (#297)
Changelog
- 63d5a7f Add CI step to validate examples against the JSON schema (#301)
- 58fa7ae Add SQL
onComplete
flag, allowsql
migration to run with others (#280) - 0f75224 Add
Roll.Schema
method (#299) - 8ed5799 Add
WithRawSQLURL
to configure an optional URl for raw sql operations (#315) - 577870c Add
rename_constraint
operation (#293) - eda936f Add
rename_constraint
operation toPgRollOperation
JSON schema definition (#300) - 4fbfdf7 Add a 'set comment' sub-operation to 'alter column' (#344)
- afad3d8 Add a 'set default' sub-operation to 'alter column' (#346)
- cc8c2d3 Add a
WithSQLTransformer
option to rewrite user-defined SQL inup
anddown
triggers (#329) - d5d4bea Add complete phase hooks (#335)
- fb05aec Add extra validation for the
rename_constraint
operation (#303) - 431b951 Add testcase to ensure new columns can't be used as the the identity column in a backfill. (#298)
- c08ef70 Add two new options to help with replication control (#290)
- 7d8460f Allow rename-only 'alter-column' operations on unbackfillable columns (#341)
- def08e2 Allow setting the
ON DELETE
behaviour of foreign key constraints (#297) - 51de6d4 Bump
golangci-lint
action tov4
(#287) - 3e49151 Bump github.com/docker/docker from 24.0.7+incompatible to 24.0.9+incompatible (#324)
- 37d2c28 Bump golang.org/x/net from 0.20.0 to 0.23.0 (#343)
- 14a2217 Bump google.golang.org/protobuf from 1.31.0 to 1.33.0 (#319)
- 2932ea3 Disallow unknown fields in migration JSON (#334)
- 4c1bc6a Dont duplicate
CHECK
constraints andDEFAULT
s when altering column type (#349) - 162bd06 Fix duplicate inferred migrations when dropping columns outside of a migration (#305)
- 0aebb50 Fix error message of column rename (#292)
- 161fde6 Fix hardcoded
pgroll
schema in state initialization (#284) - 52fb532 Format
schema.json
on generate (#294) - 4d3faeb Make
down
SQL in rename column operations use the new name of the column (#354) - 6e4ee68 Make
name
not required inPgRollMigration
(#282) - b4e3044 Make state initialization concurrency safe (#285)
- f5d09d5 Move example schema validation to its own job (#318)
- 79566b0 Preserve comments on column duplication (#323)
- 547ac3e Preserve foreign key ON DELETE attributes when FK columns are duplicated (#314)
- d4445bb Refactor alter column suboperations (#337)
- 16377ca Relax add_column requirements on pk (#286)
- 937f65c Relax backfill requirements so it works with unique columns (#288)
- 297dd38 Remove
BeforeBackfill
hook (#312) - f6cacf7 Respect foreign key
ON DELETE
in add column and create table operations (#308) - a444723 Restrict state connection search path (#342)
- 5c1aef2 Retry on
lock_timeout
errors (#353) - 944ebed Revert: Add
WithRawSQLURL
to configure an optional URl for raw sql operations (#333) - 6334cb4 Rewrite column
DEFAULT
s using the SQL transformer (#332) - 0673b1b Rewrite raw SQL operations using a SQL transformer (#330)
- 631d642 Rollback on backfill failure (#317)
- 0746ba6 Separate DDL operations from DML (backfills) on migration start (#289)
- 130f451 Strengthen SQL transformation tests (#331)
- a87fa36 Support create/drop index with uppercase names (#356)
- a4222d8 Support multiple 'alter column' sub operations (#338)
- 4f0a715 Support setting table and column comments to
NULL
(#345) - c88c060 Track foreign key
ON DELETE
setting in the internal schema representation (#311) - a7d5095 Update banner images and logo colors (#307)
- 099a443 Update documentation for foreign key options (#310)
- cf66d1f Update operation types to set a default of
""
forup
anddown
SQL (#325)