summaryrefslogtreecommitdiff
path: root/packages/db/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/db/src')
-rw-r--r--packages/db/src/index.ts6
-rw-r--r--packages/db/src/schema.ts2
2 files changed, 2 insertions, 6 deletions
diff --git a/packages/db/src/index.ts b/packages/db/src/index.ts
index 9ebf611e..b480f566 100644
--- a/packages/db/src/index.ts
+++ b/packages/db/src/index.ts
@@ -19,11 +19,7 @@ function getDb() {
}
// Export a proxy that forwards all calls to the actual db instance
-export const db = new Proxy({} as ReturnType<typeof drizzle>, {
- get(target, prop) {
- return getDb()[prop as keyof typeof _db];
- },
-});
+export const db = getDb();
// Re-export schema for convenience
export * from "./schema";
diff --git a/packages/db/src/schema.ts b/packages/db/src/schema.ts
index 12fc7689..c4af608d 100644
--- a/packages/db/src/schema.ts
+++ b/packages/db/src/schema.ts
@@ -5,7 +5,7 @@ export const users = pgTable("users", {
name: text("name").notNull(),
email: text("email").notNull().unique(),
emailVerified: boolean("email_verified")
- .$defaultFn(() => false)
+ .default(false)
.notNull(),
image: text("image"),
createdAt: timestamp("created_at")