mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 05:05:38 -04:00
Replace @libsql/client with bun:sqlite for zero-dependency SQLite access, swap drizzle-orm/libsql adapter for drizzle-orm/bun-sqlite, and rewrite Dockerfile to use oven/bun:1-alpine. The raw Database instance is no longer exported via Proxy (native C++ methods lose `this` binding through Reflect.get); instead, a closeDatabase() helper handles graceful shutdown and the health check uses Drizzle's db.run() directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9 lines
293 B
TypeScript
9 lines
293 B
TypeScript
import { migrate } from "drizzle-orm/bun-sqlite/migrator";
|
|
import { db } from "./client";
|
|
|
|
export function runMigrations() {
|
|
console.log("[migrate] Running database migrations...");
|
|
migrate(db, { migrationsFolder: "./drizzle" });
|
|
console.log("[migrate] Database migrations complete");
|
|
}
|