Skip to content

Commit 191c02b

Browse files
refactor: relocate drizzle utility to playground, update schema import path, and add User type export.
1 parent cdda468 commit 191c02b

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

playground/server/utils/drizzle.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { drizzle } from "drizzle-orm/d1";
2+
import * as schema from "../database/schema";
3+
4+
export { sql, eq, and, or } from "drizzle-orm";
5+
6+
export const tables = schema;
7+
8+
export function useDrizzle() {
9+
return drizzle(hubDatabase(), { schema });
10+
}
11+
12+
export type User = typeof schema.users.$inferSelect;

src/runtime/server/utils/drizzle.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)