This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user