migrar BD cuando se corre el sitio

This commit is contained in:
Cat /dev/Nulo 2024-01-14 10:18:48 -03:00
parent c52ed1d569
commit 1214aa5fbe

View file

@ -1,10 +1,2 @@
import Database from "better-sqlite3"; export { db } from "db-datos/db.js";
import { drizzle } from "drizzle-orm/better-sqlite3";
import * as schema from "db-datos/schema.js";
import { env } from "$env/dynamic/private";
const sqlite = new Database(env.DB_PATH ?? "../scraper/sqlite.db");
const db = drizzle(sqlite, { schema });
export { db };
export * as schema from "db-datos/schema.js"; export * as schema from "db-datos/schema.js";