11 lines
367 B
TypeScript
11 lines
367 B
TypeScript
import { drizzle } from "drizzle-orm/node-postgres";
|
|
import * as schema from "~~/db/schema";
|
|
|
|
export const useDrizzle = () => {
|
|
return drizzle(process.env.DATABASE_URL!)
|
|
}
|
|
|
|
export const tables = schema;
|
|
|
|
export const UserInsert = schema.user.$inferInsert;
|
|
export type UserRegisterType = Omit<typeof UserInsert, "createdAt" | "updatedAt" | "id" | "emailVerified">; |