feat: add mysql support (#212)
* feat: add mysql support * fix: lockfile broken * fix: ci issues * fix: ci issues * fix: ci issues
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
import Database from "better-sqlite3";
|
||||
import type { BetterSQLite3Database } from "drizzle-orm/better-sqlite3";
|
||||
import { drizzle } from "drizzle-orm/better-sqlite3";
|
||||
|
||||
import { database } from "./driver";
|
||||
import * as sqliteSchema from "./schema/sqlite";
|
||||
|
||||
// Export only the types from the sqlite schema as we're using that.
|
||||
export const schema = sqliteSchema;
|
||||
|
||||
export * from "drizzle-orm";
|
||||
|
||||
export const sqlite = new Database(process.env.DB_URL);
|
||||
export const db = database;
|
||||
|
||||
export const db = drizzle(sqlite, { schema });
|
||||
|
||||
export type Database = BetterSQLite3Database<typeof schema>;
|
||||
export type Database = typeof db;
|
||||
|
||||
export { createId } from "@paralleldrive/cuid2";
|
||||
|
||||
Reference in New Issue
Block a user