9router / src /lib /db /migrations /001-initial.js
2api
feat: configurable stream stall timeout + per-provider UI
88c4c60
Raw
History Blame Contribute Delete
456 Bytes
// Initial schema bootstrap. For fresh DB this creates all tables/indexes.
// For existing DB at version 0 (legacy unstamped), it's idempotent (IF NOT EXISTS).
import { TABLES, buildCreateTableSql } from "../schema.js";
export default {
version: 1,
name: "initial",
up(db) {
for (const [name, def] of Object.entries(TABLES)) {
db.exec(buildCreateTableSql(name, def));
for (const idx of def.indexes || []) db.exec(idx);
}
},
};