mirror of
https://github.com/ajnart/homarr.git
synced 2026-01-31 11:49:14 +01:00
* feat: add user groups * wip: add unit tests * wip: add more tests and normalized name for creation and update * test: add unit tests for group router * fix: type issues, missing mysql schema, rename column creator_id to owner_id * fix: lint and format issues * fix: deepsource issues * fix: forgot to add log message * fix: build not working * chore: address pull request feedback * feat: add mysql migration and fix merge conflicts * fix: format issue and test issue
15 lines
399 B
TypeScript
15 lines
399 B
TypeScript
import Database from "better-sqlite3";
|
|
import { drizzle } from "drizzle-orm/better-sqlite3";
|
|
import { migrate } from "drizzle-orm/better-sqlite3/migrator";
|
|
|
|
import { schema } from "..";
|
|
|
|
export const createDb = () => {
|
|
const sqlite = new Database(":memory:");
|
|
const db = drizzle(sqlite, { schema });
|
|
migrate(db, {
|
|
migrationsFolder: "./packages/db/migrations/sqlite",
|
|
});
|
|
return db;
|
|
};
|