Releases: daichirata/hammer
Releases · daichirata/hammer
v0.7.0
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
spansqlto memefish (#66). CREATE ROLE/DROP ROLE/GRANT/REVOKEfor 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 INDEXdiff support (#68).ALTER INDEX ... ADD/DROP STORED COLUMNis emitted when onlySTORINGchanges, instead of recreating the index (#70).- Spurious-diff normalisations:
INTERLEAVE IN PARENT twithout an explicitON DELETEFOREIGN KEY (...) ENFORCEDvs. omitted default(col ASC)in index / PK /ORDER BYCREATE INDEX IF NOT EXISTS- Change stream
FORtable / column ordering andOPTIONSrecord ordering - Inline
id INT64 PRIMARY KEYvs. table-levelPRIMARY KEY(id)
- Multi-change-stream diff output is now ordered deterministically.
DROP INDEXis emitted before dropping a column referenced viaSTORING,PARTITION BY, orORDER BY(#96).DROP CONSTRAINTis emitted before changingNOT NULLon 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 BUNDLEnow produces a parse error by default; the flag restores the previous silent-ignore behaviour. - Spanner Emulator usage is documented;
SPANNER_EMULATOR_HOSTis honoured transparently (#90). - Outstanding Dependabot alerts cleared (#89, #91).
Other changes
- Memefish updated to pick up SQL
MODELAST changes (#77). - Multiple change-stream diff hardening fixes (#78, #79, #80, #82).
- Hidden-column DEFAULT ordering fixed (#69, #71).
--ignore-modelsflag for unsupportedCREATE MODEL(#75).- Test cases regrouped by statement type and ~doubled in count (#87).
- Test-failure output rewritten to show readable multi-line
want/gotblocks (#86). - CI Go version bumped to 1.24.x / 1.25.x.
Behavioural changes worth calling out
- 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.
- 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
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
v0.7.0-beta.5
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
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
Changelog
- 853760e Fix foreign key constraint diffs for default delete action
v0.7.0-beta.2
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
Changelog
- 3b3cd7c Make sure HIDDEN is added after default semantics
v0.7.0-beta
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