Docs/Skills and code/src/
src/stages/24-migrate-queue-tables.js
import { config } from "../../config.js";
import { getDb } from "../db.js";
import { ensureQueueTables, migrateLegacyQueueScores, QUEUE_TABLES } from "../analysis/queue-table-store.js";
const db = getDb();
console.log("[queue-table-migration] Starting", { database: config.dbPath, queues: Object.keys(QUEUE_TABLES) });
ensureQueueTables(db);
const result = migrateLegacyQueueScores(db);
const counts = Object.fromEntries(Object.entries(QUEUE_TABLES).map(([key, table]) => [key, db.prepare(`SELECT COUNT(*) AS n FROM ${table}`).get().n]));
console.log("[queue-table-migration] Complete", { ...result, tableCounts: counts });
db.close();
Shown as it is in the repository at build time (2026-11-03); the home directory appears as <home>. If this page and the file differ, the file is right. Back to the catalogue.