fix(db): keep router_profile through the legacy lanes rebuild
The (cwd, tool) rebuild lists its columns by hand and omitted router_profile, which its probe adds earlier in the same start — a legacy DB lost the column (and every lane's router) until the next restart.
This commit is contained in:
@@ -85,6 +85,17 @@ describe("legacy lanes_new rebuild (pre-tool, single-column cwd UNIQUE DB)", ()
|
||||
assert.equal(row.tool, "claude");
|
||||
});
|
||||
|
||||
it("keeps every column added before the rebuild, router_profile included", () => {
|
||||
const { db } = require("../db");
|
||||
const cols = db
|
||||
.prepare("PRAGMA table_info(lanes)")
|
||||
.all()
|
||||
.map((c) => c.name);
|
||||
for (const name of ["router_profile", "needs_action_session"]) {
|
||||
assert.ok(cols.includes(name), `expected ${name} to survive the rebuild`);
|
||||
}
|
||||
});
|
||||
|
||||
it("recreates idx_lanes_session and idx_lanes_slot", () => {
|
||||
const { db } = require("../db");
|
||||
for (const name of ["idx_lanes_session", "idx_lanes_slot"]) {
|
||||
|
||||
Reference in New Issue
Block a user