mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-27 00:40:58 +01:00
* chore(deps): update dependency @types/better-sqlite3 to v7.6.9 * fix: lint issue --------- Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com> Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
18 lines
493 B
TypeScript
18 lines
493 B
TypeScript
import Database from "better-sqlite3";
|
|
import type { BetterSQLite3Database } from "drizzle-orm/better-sqlite3";
|
|
import { drizzle } from "drizzle-orm/better-sqlite3";
|
|
|
|
import * as sqliteSchema from "./schema/sqlite";
|
|
|
|
export const schema = sqliteSchema;
|
|
|
|
export * from "drizzle-orm";
|
|
|
|
const sqlite = new Database(process.env.DB_URL);
|
|
|
|
export const db = drizzle(sqlite, { schema });
|
|
|
|
export type Database = BetterSQLite3Database<typeof schema>;
|
|
|
|
export { createId } from "@paralleldrive/cuid2";
|