Skip to content

SMT v1.4.0

Latest

Choose a tag to compare

@johndauphine johndauphine released this 26 Jul 07:18
· 9 commits to main since this release
3f1e459

Added

  • Public schema-evolution DDL API (#247) — schema.Renderer now
    exposes deterministic drops for schemas, tables, indexes, and named
    constraints; column add/drop/type/nullability/default changes; and table
    truncation. The public API returns ordered schema.Batch artifacts and
    keeps execution, retry, and transaction policy with the caller. Built-in
    capability reporting covers PostgreSQL, SQL Server, MySQL, SQLite, and
    ClickHouse; unsupported operations return
    *schema.UnsupportedFeatureError instead of silently degrading or proposing
    a rebuild. PostgreSQL supports the complete current surface and explicit
    cascade; SQL Server and MySQL support the non-cascade surface; SQLite and
    ClickHouse advertise only their supported subsets. MySQL/SQLite destructive
    batches carry same-connection cleanup semantics, SQL Server default
    replacement is an ordered same-connection batch, and SQLite sequence cleanup
    is explicitly best effort. EvolutionCapabilities is a companion extensible
    public capability surface, preserving existing exported Capabilities and
    Statement struct layouts. RendererVersion 19 → 20.

  • Expression IR for DEFAULT / CHECK translation (#175) — new
    internal/expr package: a source default or CHECK predicate is parsed once
    into a small dialect-neutral tree (ParseDefault / ParseCheck), rendered
    to any of the three targets from that one parse (Render), and compared
    structurally (Equal). All three targets — not just PostgreSQL — now share
    one translation with equal coverage (now/UTC-now/uuid families,
    CONVERT(date, …)/::date casts, ISNULL ≡ COALESCE ≡ IFNULL,
    CONCAT ≡ ||, boolean 0/1 rewrites, IN lists, LIKE-bracket-class and
    regex forms, MySQL fsp-matched now-defaults) and one fail-closed invariant:
    an unparseable or unknown-function expression is rejected on every target
    instead of silently passed through.

  • Snapshot-mode sync (#167) — smt sync --against snapshot diffs the
    current source schema against the latest stored snapshot, with scope
    filtering, object-kind gating, plan summary, unsupported-change refusal,
    deterministic ALTER rendering, and the same risk gates as live-target sync.

Changed

  • Side-object AI review uses structured comparison ([#177]) — index,
    foreign-key, and check-constraint review now deterministically compares
    structured source metadata and generated DDL instead of asking a model to
    judge free text.
  • Added a CI CRM fixture matrix covering all nine supported SQL Server,
    PostgreSQL, and MySQL source-to-target permutations.