mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-23 06:36:19 +00:00
12 lines
361 B
TypeScript
12 lines
361 B
TypeScript
|
import { migrate } from "drizzle-orm/better-sqlite3/migrator";
|
||
|
import Database from "better-sqlite3";
|
||
|
import { drizzle } from "drizzle-orm/better-sqlite3";
|
||
|
import * as schema from "./schema.js";
|
||
|
|
||
|
const sqlite = new Database("../scraper/sqlite.db");
|
||
|
const db = drizzle(sqlite, { schema });
|
||
|
|
||
|
await migrate(db, { migrationsFolder: "./drizzle" });
|
||
|
|
||
|
sqlite.close();
|