File size: 355 Bytes
f500658 | 1 2 3 4 5 6 7 8 9 | import { readFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
import type { SqliteDatabase } from "./types.ts";
export async function applyInitialSchema(db: SqliteDatabase): Promise<void> {
const migration = await readFile(fileURLToPath(new URL("./migrations/001_initial.sql", import.meta.url)), "utf8");
db.exec(migration);
}
|