Skip to main content

attune_cmd

Function attune_cmd 

Source
pub fn attune_cmd(
    target: Option<&str>,
    apply: bool,
    record: bool,
    record_ledger: bool,
    record_reason: &str,
    squash: bool,
    from: Option<&str>,
    publish: bool,
    app: Option<&str>,
    workspace: Option<PathBuf>,
) -> ExitCode
Expand description

djogi migrations attune entry point. Mode selection (per CLI flags):

--record-ledger--squashresolved mode
falsefalseAttuneMode::DiffOnly (read-only diff)
truefalseAttuneMode::Record
falsetrue[AttuneMode::Squash { from, publish, app }]
truetruerejected by clap (conflicts_with)
Argument semantics:
  • target is an optional positional Git target (commit / tag / branch). When supplied, attune resolves it (local first, fetch on miss) before any DB / disk mutation.
  • apply gates DB / disk mutation. Without it, every mode is a dry-run.
  • record controls the parent repo’s recorded submodule pointer (separate from record_ledger, which controls the djogi_schema_migrations ledger inserts). --squash requires --from <ver>; an absent from while --squash is set surfaces as a CLI error before any work happens.