Skip to content

Releases: daichirata/hammer

v0.7.0

21 May 03:24
cd7ce7c

Choose a tag to compare

The first stable v0.7 release, capping the v0.7.0-beta series. Includes feature work since v0.6.5 plus the bug fixes and test additions made before tagging.

Highlights

  • DDL parsing switched from spansql to memefish (#66).
  • CREATE ROLE / DROP ROLE / GRANT / REVOKE for tables, views, change streams, and table functions, including column-level grants. Revoke-before-drop ordering is handled automatically (#73, #74, #75, #76).
  • CREATE SEARCH INDEX / ALTER SEARCH INDEX / DROP SEARCH INDEX diff support (#68).
  • ALTER INDEX ... ADD/DROP STORED COLUMN is emitted when only STORING changes, instead of recreating the index (#70).
  • Spurious-diff normalisations:
    • INTERLEAVE IN PARENT t without an explicit ON DELETE
    • FOREIGN KEY (...) ENFORCED vs. omitted default
    • (col ASC) in index / PK / ORDER BY
    • CREATE INDEX IF NOT EXISTS
    • Change stream FOR table / column ordering and OPTIONS record ordering
    • Inline id INT64 PRIMARY KEY vs. table-level PRIMARY KEY(id)
  • Multi-change-stream diff output is now ordered deterministically.
  • DROP INDEX is emitted before dropping a column referenced via STORING, PARTITION BY, or ORDER BY (#96).
  • DROP CONSTRAINT is emitted before changing NOT NULL on a column referenced by a foreign key, and the constraint is re-added afterwards (#97, #98, closes #32).
  • New flag --ignore-proto-bundles (#88). CREATE PROTO BUNDLE now produces a parse error by default; the flag restores the previous silent-ignore behaviour.
  • Spanner Emulator usage is documented; SPANNER_EMULATOR_HOST is honoured transparently (#90).
  • Outstanding Dependabot alerts cleared (#89, #91).

Other changes

  • Memefish updated to pick up SQL MODEL AST changes (#77).
  • Multiple change-stream diff hardening fixes (#78, #79, #80, #82).
  • Hidden-column DEFAULT ordering fixed (#69, #71).
  • --ignore-models flag for unsupported CREATE MODEL (#75).
  • Test cases regrouped by statement type and ~doubled in count (#87).
  • Test-failure output rewritten to show readable multi-line want / got blocks (#86).
  • CI Go version bumped to 1.24.x / 1.25.x.

Behavioural changes worth calling out

  1. Fewer spurious DDLs: if you relied on hammer recreating an object purely because of a case or syntax-surface change, you may see no diff now.
  2. Multi-change-stream diff ordering is stable but may differ from v0.7.0-beta.7.

Thanks

@morikuni, @apstndb, @rasviitanen, @toga4, @nakashimanh, @tomrom-pomelo, @dansheerhealth, @winor30, @sters, @ateirney-nz.

v0.7.0-beta.7

15 Feb 12:27
59af808

Choose a tag to compare

Changelog

  • 2159130 Add dropedChangeStream tracking for FOR ALL change streams
  • f11fb05 Add edge case tests for DROP CHANGE STREAM output
  • 7dd548f Correct DDL generation for various CHANGE STREAM alterations
  • c7a66e8 Fix duplicate ALTER CHANGE STREAM output when dropping table
  • ef897a3 Fix redundant change stream SET FOR on FOR scope transitions
  • 7d0c5aa Fix unnecessary ALTER before DROP CHANGE STREAM
  • 9a9bacb Fix unnecessary REVOKE when dropping table with change stream
  • 4bca6aa Improve constraint handling and table modification logic
  • cb28ae1 Refactor database schemas and update related tests
  • cfebec0 Reorder DDL generation to handle CHANGE STREAM before table drops
  • 78260c2 feat(diff): add support for altered change stream states with recreating table

v0.7.0-beta.6

16 Sep 07:09
9f2413d

Choose a tag to compare

Changelog

  • b38f60e Adding a test
  • 34b7697 Bumping memefish version to pick up latest SQL MODEL changes

v0.7.0-beta.5

04 Sep 06:42

Choose a tag to compare

Changelog

  • fa8343c Update internal/hammer/diff.go
  • ca5d41a Update internal/hammer/diff.go
  • ba24e4b chore(ci): update Go versions in workflows to 1.24 and 1.25
  • 67c47c7 feat(fgac): adjust DROP ROLE logic; clean up tests
  • e8f1413 feat(fgac): revoke before DROP; re-grant after recreate
  • 2a1544e feat(fgac): skip REVOKE for object drops; keep pre-REVOKE for DROP ROLE

v0.7.0-beta.4

01 Sep 04:44
9711715

Choose a tag to compare

Changelog

  • 01aa6c1 Add test cases for role and grant diff logic
  • 55a6079 Adding --ignore-models flag to all commands
  • 8c74475 Clean up commented-out import
  • 6f0e5b2 feat: Add Role and Grant
  • 92847e0 fix(diff/diff_test): use unified function for comparing 'ast.Ident' lists
  • 8493b75 fix(fgac): improve privilege comparison logic for GRANT/REVOKE

v0.7.0-beta.3

23 Jul 07:33
62c8239

Choose a tag to compare

Changelog

  • 853760e Fix foreign key constraint diffs for default delete action

v0.7.0-beta.2

05 Jun 19:15
e25f24b

Choose a tag to compare

Changelog

  • 85e13f2 Add helper for checking hidden column
  • 4855e4b Add support for index alteration
  • f325be7 Avoid generates ALTER INDEX if index needs to be recreated
  • d7ce307 Make hidden column diff not depend on position
  • 1a11320 Move generateDDLForAlterIndex position
  • a3a9051 Rename method name to be a more natural
  • 8a58df3 Rename method to better reflect its purpose'

v0.7.0-beta.1

04 Jun 14:54
44c392c

Choose a tag to compare

Changelog

  • 3b3cd7c Make sure HIDDEN is added after default semantics

v0.7.0-beta

03 Jun 16:02
73af547

Choose a tag to compare

Changelog

  • 7be3094 Add suggested tests
  • fe25ee5 Add support for search indexes
  • 1aa78b6 Add test case for named schema and keyword identifier
  • 0721240 Assume ASC when index direction is unspecified
  • 797e411 Fix ASC for primary key
  • b0c31a8 Fix test
  • d2f03e5 Fix typo
  • 693ce80 Handle default initialized hidden column
  • 3e445b0 Migrate from spansql to memefish
  • dce9176 Remove unnecessary nil check
  • 5e6ece4 Show actual statement if it was not supported
  • 18a5bd3 Stop using SQL() to compare identifiers
  • 52a5ee0 Update memefish to the latest version
  • 3faa904 Use memefish released version

v0.6.5

29 Aug 02:45
8517811

Choose a tag to compare

Changelog

  • 497c8af Fix case-sensitive table and column names