github xataio/pgroll v0.10.0

21 hours ago

⚡ Highlights

  • 🚎 Improve integration with ORMs: new subcommand convert to translate ORM SQL migrations scripts into pgroll migrations
  • 🏄 Avoid ACCESS_EXCLUSIVE table lock when adding UNIQUE columns
  • 🔓 Avoid ACCESS_EXCLUSIVE table lock when adding volatile DEFAULTs to columns

Thanks to first time contributors 🙏 ❤️ :

🔴 Breaking changes

Previously, create_index expected a list of strings in columns:

{
  "name": "10_create_index",
  "operations": [
    {
      "create_index": {
        "table": "employees",
        "columns": ["salary"]
      }
    }
  ]
}

To support advanced index field settings like sort, null, collate and opclass, columns must be a map:

{
  "name": "10_create_index",
  "operations": [
    {
      "create_index": {
        "table": "employees",
        "columns": {
          "salary": {}
        }
      }
    }
  ]
}

Changelog

  • 5410020 Add columns with volatile DEFAULTs without an ACCESS_EXCLUSIVE table lock (#694)
  • 346f7f9 Add new command convert to convert SQL migrations to pgroll operations (#685)
  • ab567b6 Add support for no_inherit on column level constraints and in create_constraint operation (#670)
  • 8791a93 Add unique column without exclusive lock (#679)
  • f3432da Alter sequence owner before dropping the column (#668)
  • 81eee8b Bump github.com/spf13/cobra from 1.8.1 to 1.9.1 (#688)
  • 1107841 Bump golang.org/x/tools from 0.29.0 to 0.30.0 (#672)
  • 9a3eaed Error out if table/column is missing (#681)
  • 331c25f Handle errors in UpdateVirtualSchema (#693)
  • 7b383dc Improve create_index operation with extra index element settings (#697)
  • d697304 Improve validation of create_table and add_column operations (#666)
  • 3e21e4d Make backfill batch selection exclude rows inserted or updated after backfill start (#652)
  • cad53be Move ConstraintSQLWriter to a separate file (#665)
  • cd19f8a Move backfill options to start and migrate command (#660)
  • bd6134d Publish convert command and add new documentation page (#700)
  • e337b62 Re-read schema in between operations during migration completion (#692)
  • 136ee5f Remove hidden command sql (#687)
  • 9dffe02 Remove the WithSQLTransformer option (#696)
  • 5158568 Rename testcases (#691)
  • bc24f9e Support parsing multiple SQL statements in sql2pgroll.Convert (#690)
  • 97dbca2 Support table and column rename operations preceding create_constraint FOREIGN KEY operations (#682)
  • 1f26ef1 Support table and column rename operations preceding create_constraint UNIQUE operations (#676)
  • 1558ef7 Support table and column rename operations preceding create_constraint operations (#674)
  • d927f3e Support table and column rename operations preceding drop_multicolumn_constraint operations (#684)
  • 2786cc2 Update Operation.Start signature to remove callbacks parameter (#675)
  • e4d2408 Use -tags=netgo,osusergo when building pgroll binary (#699)
  • cacc250 Use sql2pgroll.Convert in convert command to translate SQL statements from migration file and stdin (#695)

Don't miss a new pgroll release

NewReleases is sending notifications on new releases.