diff --git a/internal/store/live_test.go b/internal/store/live_test.go index aad4d75..a03a03a 100644 --- a/internal/store/live_test.go +++ b/internal/store/live_test.go @@ -199,6 +199,11 @@ func TestASchemaChangeAndItsRecordCommitTogether(t *testing.T) { } } +// Defends novox/hq ADR 0013: a schema change is a numbered migration. +// +// The property that makes a schema trustworthy months later is not that migrations ran, but that +// they refuse to run when the record and the files disagree — an edited migration is a schema +// nobody can reproduce. func TestAChangedMigrationIsRefusedAgainstARealRecord(t *testing.T) { // The same refusal as the unit test, against a record PostgreSQL actually kept — which is // what the guard protects, and the unit test can only model.