Part of #424. Size: M · Depends on: #428
What are you trying to do?
Apply the safe part of a schema check: add the new source columns to the model, like Desktop's Refresh does, without a full re-import.
What do we do today?
tx schema check (#428) reports drift. Fixing it means a tx add … -t DataColumn for each column, by hand.
What would tx do?
tx schema sync [model] [--table <name>]... [--save | --stage] [--dry-run]
- Added columns: creates each
added column as a DataColumn with its name (after any M rename), sourceColumn and mapped dataType. It runs through MutationRunner, so --save, --stage, the preview and live-session undo all work. A run is one transaction labelled "schema sync".
- Never removes columns.
removed findings are reported with their dependants, and the exit code is non-zero.
typeChanged: only applied with --types, and listed in the preview.
notSelected (the M projects the column out): not added. It reports the M edit that would be needed. Rewriting M comes later.
Acceptance criteria
sync followed by check reports no added columns.
--dry-run matches the mutation preview format of the other modify commands.
- Docs and the command surface snapshot are updated.
🤖 Generated with Claude Code
Part of #424. Size: M · Depends on: #428
What are you trying to do?
Apply the safe part of a schema check: add the new source columns to the model, like Desktop's Refresh does, without a full re-import.
What do we do today?
tx schema check(#428) reports drift. Fixing it means atx add … -t DataColumnfor each column, by hand.What would tx do?
addedcolumn as aDataColumnwith its name (after any M rename),sourceColumnand mappeddataType. It runs throughMutationRunner, so--save,--stage, the preview and live-session undo all work. A run is one transaction labelled "schema sync".removedfindings are reported with their dependants, and the exit code is non-zero.typeChanged: only applied with--types, and listed in the preview.notSelected(the M projects the column out): not added. It reports the M edit that would be needed. Rewriting M comes later.Acceptance criteria
syncfollowed bycheckreports noaddedcolumns.--dry-runmatches the mutation preview format of the other modify commands.🤖 Generated with Claude Code