Run migrations so state can be renamed #6

Closed
opened 2026-08-16 22:10:09 +01:00 by joshquinlan · 1 comment
Owner

bootstrap.sh restows and nothing else, so a second machine picks up
new code over old state and gets repaired by hand.

migrations/.sh, markers under
~/.local/state/donbox/migrations/, 'donbox migrate' running what is
pending, and bootstrap.sh calling it after the restow. Each
migration is idempotent, and its test runs it twice to prove it and
once against non-legacy state to prove it leaves customisation
alone.

bootstrap.sh restows and nothing else, so a second machine picks up new code over old state and gets repaired by hand. migrations/<unix-timestamp>.sh, markers under ~/.local/state/donbox/migrations/, 'donbox migrate' running what is pending, and bootstrap.sh calling it after the restow. Each migration is idempotent, and its test runs it twice to prove it and once against non-legacy state to prove it leaves customisation alone.
Author
Owner

migrations/.sh at the repository root, ignored by stow, markers under ~/.local/state/donbox/migrations, and "donbox migrate" running whatever this machine has not seen. bootstrap.sh calls it before the links are laid down, since it is what clears the old copies out of their way.

A migration that fails stops the run and records nothing, so nothing later builds on a half-move. Landed in 002021a with test/shell.d/migrate-test.sh over ordering, markers, failure and repair.

migrations/<unix-timestamp>.sh at the repository root, ignored by stow, markers under ~/.local/state/donbox/migrations, and "donbox migrate" running whatever this machine has not seen. bootstrap.sh calls it before the links are laid down, since it is what clears the old copies out of their way. A migration that fails stops the run and records nothing, so nothing later builds on a half-move. Landed in 002021a with test/shell.d/migrate-test.sh over ordering, markers, failure and repair.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
joshquinlan/dotfiles#6
No description provided.