Migration 0105 drops the tables of the chain behind a guard; a source scan proves no code names them (issue 1096)

The migration raises first unless chain_moved names builds, rollouts and assignments for every kind that holds rows, and unless pending_assignment holds no open or unanswered row; then it drops build_request, build, batched_merge, release_plan, pending_assignment, assignment, raise_assignment_generation(), node.sent_builds and chain_moved. build_gate stays.
This commit is contained in:
2026-10-18 05:32:14 +02:00
parent 9859923664
commit 472744bbaa
4 changed files with 196 additions and 7 deletions
@@ -242,7 +242,4 @@ func TestAnAssignmentWaitingForItsBuildIsOneKeyOfTheAssignmentsBucket(t *testing
if !slices.Contains(assignedTo(t, open, "laptop"), "sensors") {
t.Fatal("the build registered sensors and it was not assigned")
}
if rows := inv.QueryForTest(t, `select count(*) from pending_assignment`); rows[0][0] != "0" {
t.Fatalf("the table of pending assignments took %s rows", rows[0][0])
}
}