Core schema modeling, lexical diffing, semantic drift, migration planning, replay, clarification, and SQL rendering primitives.
Gaman works with three schema sources: authored input, replayed migration state, and live inspected state. Authored input is normalized and lexically diffed against replayed state to generate migrations. Live inspected state is normalized through the selected dialect and semantically drift-diffed against replayed state using dialect comparator callbacks.
input Schema -> normalize + prepare(dialect)
|
replayed Schema --------+-> DiffEngine -> raw operations -> Clarifier -> Migration
inspected Schema -> normalize_inspected_schema(dialect)
|
replayed Schema --------+-> drift::diff -> VerificationReport
VerificationReport -> repair::plan_repair -> repair operations -> SQL
Migration replay -> prepare(dialect) -> SqlPlanRenderer + Dialect -> SQL
parsers loads SQL DDL into Schema; offline_planner owns offline
generation; drift owns semantic live drift reports; repair owns
database-I/O-free drift repair planning; sql_plan renders forward,
rollback, and repair SQL from migrations.