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
+3 -5
View File
@@ -1,9 +1,7 @@
import { db } from './index.js';
// The heavy lifting is idempotent DDL inside schema.sql, which db() runs on
// first handle. This module exists as an explicit hook for future migrations
// (numbered .sql files applied via a schema_version row) and to be called
// from hooks.server.ts so boot-time failures surface early.
// Called from hooks.server.ts so startup fails before workers or requests run.
// db() applies the ordered migrations.ts list using PRAGMA user_version.
export function migrate(): void {
db().prepare('SELECT 1').get();
db();
}