fix(db): renumber exclusive_connection_leases migration 155 -> 157

Two independently-merged PRs (#10263 agentic-conversation-tracking-v4
and #10362 exclusive-managed-session-leases) each picked migration
slot 155 against different base states, landing a real collision on
release/v3.8.50 (155_agentic_conversations.sql vs
155_exclusive_connection_leases.sql; #10263 also claimed 156 via
156_conversation_turn_nodes.sql). Renumbered #10362's migration to the
next free slot (157) and updated its own regression test
(exclusive-connection-leases.test.ts) that asserted the literal
filename/slot. No retroactive guard needed: CREATE TABLE IF NOT
EXISTS is idempotent under either number.

Confirmed via check-migration-numbering.mjs (154 migrations, 0
duplicates) and the full exclusive-connection-leases test suite
(11/11 pass).
This commit is contained in:
adevwithpurpose
2026-08-18 11:54:53 -03:00
parent 72d761fb50
commit 59c8a9afc9
2 changed files with 2 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ test("hashes canonical owners and never persists the raw owner", () => {
test("uses the live next-free migration slot without runner compatibility special cases", () => {
const migration = fs.readFileSync(
new URL("../../src/lib/db/migrations/155_exclusive_connection_leases.sql", import.meta.url),
new URL("../../src/lib/db/migrations/157_exclusive_connection_leases.sql", import.meta.url),
"utf8"
);
const runner = fs.readFileSync(
@@ -57,7 +57,7 @@ test("uses the live next-free migration slot without runner compatibility specia
"utf8"
);
assert.match(migration, /CREATE TABLE IF NOT EXISTS exclusive_connection_leases/);
assert.doesNotMatch(runner, /case "155"/);
assert.doesNotMatch(runner, /case "157"/);
});
test("enforces global active owner and connection uniqueness", () => {