Public repository: timo / mitch

Reader

A migration stitcher (therefore mitch) for PostgreSQL, SQLite, MariaDB, and others

mitch / docs / roadmap / linked-projects-in-checkout.md · 1.3 KB · at 76a2c3d332a1 · raw

Linked projects in checkout

Goal

When checkout switches branches and a linked project changes with it (a moved git submodule or Mercurial subrepository, or edited files of a nested project), mitch reverts and applies the linked project's migrations the same way it does for the project's own migrations. stash and up --watch follow along.

Why

Linked projects are delivered by the version-control system, so switching branches can change them. Today the deployment can end up out of step with the linked project's files after a checkout.

Already settled

  • First stage, implemented with issue #1: checkout ignores files of nested linked projects and warns when a linked project differs on the target, for directories, git submodules and Mercurial subrepositories. up --watch ignores changes in linked projects and says so.
  • Delivering and updating linked projects stays out of mitch: ADR project/code-delivery-is-out-of-scope. A plain git checkout does not update submodules, so the files may not match the target until the user updates them.
  • Linked projects in sibling directories outside the repository share no version control with the project, so checkout cannot see their changes.
  • The checkout plan is to compare migrations by ID and hash instead of by path (specced in issue #2), which may make linked projects easier to include.