Skip to content

2.0.0-beta.2

Pre-release
Pre-release

Choose a tag to compare

@gmr gmr released this 09 Oct 15:56
2.0.0-beta.2
bde4e3e

This is the second beta of pglifecycle 2.0. It closes many of the known-limitation issues from beta.1: pull now models more of what pg_dump writes, and deploy gives an empty plan for more hand-written forms. The limits that remain are on the known limitations page.

Added

  • pull, build and deploy support security labels. Each object that can have a label, event triggers and view columns included, gets a security_labels map ({provider: label}) next to its comment. Before, pull failed on a SECURITY LABEL entry (#206, #220, #225).
  • Views keep their triggers (for example INSTEAD OF). Before, pull lost a trigger on a view with only a warning (#224).
  • pull, build and deploy keep comments on view and materialized view columns, composite type attributes, domain constraints, foreign data wrappers and servers. Before, these comments went to remaining.yaml (#218, #221, #222, #223).
  • A NOT VALID domain CHECK (#204).
  • project.yaml keeps the connection_limit and is_template of the database (#210).
  • A table-level column_settings list keeps the statistics target and storage of a column that an inheritance child inherits (#216).

Changed

  • deploy adds and removes partitions in place. Before, a new partition rebuilt the parent, and with --allow-drop the data of the parent was lost (#212).
  • deploy changes a primary key or unique constraint in place. Before, the change rebuilt the whole table (#214).
  • Against a live database, deploy asks the server to deparse a view query that is still different after formatting, so a query without explicit casts no longer changes on each deploy (#226).
  • Validation enforces the required fields of six schemata (for example the location of a tablespace), and refuses text search mapping keys that differ only in case (#203).
  • pull and deploy show the warnings of a successful pg_dump. PGDATABASE is left to libpq, so a connection string in it is no longer expanded (#205).

Fixed

  • deploy gives an empty plan on a second run for hand-written forms: dollar-quoted casts, view, materialized view and SQL function bodies in another layout, the name of a column CHECK, the detailed form of key columns, a new unnamed domain CHECK, and mixed partition forms (#208, #209, #212, #217).
  • build no longer writes ;; after a view or materialized view query that ends with ; (#208, #217).
  • deploy puts more statements after a new function that they call, so the script no longer fails on apply (#207).
  • deploy changes an integer column to serial when the column owns no sequence. Before, it wrote ALTER COLUMN ... TYPE serial, which PostgreSQL refuses (#214).
  • An attached partition gets the NOT NULL of its parent, so ATTACH PARTITION no longer fails (#212).
  • A change of a parent NOT NULL to NO INHERIT converges in one deploy (#213).
  • deploy matches and drops the PUBLIC user mapping correctly (#202).
  • Two operator class cases: a create over an implied family with members, and an added member in the slot of a dropped family member (#211).
  • deploy warns about a subscription that only the database has when the reading role cannot see subscriptions (#205).