Skip to content

v0.10.0

Choose a tag to compare

@marcelocantos marcelocantos released this 01 Mar 11:00
· 22 commits to master since this release

What's new

Redundant index detection

diff() / Diff() now automatically detects redundant indexes in the desired schema and includes warnings in the MigrationPlan. Three detection modes:

  • PK-duplicate: indexes whose columns are a prefix of (or identical to) the table's PRIMARY KEY
  • Prefix-duplicate: non-unique indexes whose columns are a prefix of another index (with matching WHERE clause)
  • Exact-duplicate: indexes with identical columns and WHERE clause

UNIQUE prefix indexes are not flagged — they enforce tighter constraints than the longer index.

A standalone detect_redundant_indexes() / DetectRedundantIndexes() function is also available for use outside the diff workflow.

New API surface (C++ and Go)

  • WarningType enum (RedundantIndex)
  • Warning struct with type, message, index_name, covered_by, table_name
  • MigrationPlan::warnings() / MigrationPlan.Warnings() accessor
  • detect_redundant_indexes() / DetectRedundantIndexes() standalone function
  • JSON serialization round-trips include warnings

1.0 readiness

This is the 4th consecutive additive minor release (v0.7.0 → v0.10.0), reaching the settling threshold. The remaining gap before 1.0 is Go Example* test functions.

Full changelog: v0.9.0...v0.10.0