Use ordered SQLite migrations (Refs #75)
CI / checks (push) Successful in 5m6s

This commit is contained in:
2026-10-10 00:01:18 -04:00
parent a0663e43b8
commit 8d1bb69591
56 changed files with 1085 additions and 736 deletions
+1 -4
View File
@@ -5,7 +5,6 @@ import { EventEmitter } from 'node:events';
import { createHash, randomBytes, randomUUID, timingSafeEqual } from 'node:crypto';
import { isIP } from 'node:net';
import { db } from '../db/index.js';
import { ensureHostSchema } from './schema.js';
import {
successfulObservation,
routineObservationSql,
@@ -60,9 +59,7 @@ export function waitForHostWork(
}
const digest = (token: string) => createHash('sha256').update(token).digest('hex');
function database() {
const handle = db();
ensureHostSchema(handle);
return handle;
return db();
}
type HostRow = {
id: string;