From 024f3cb1f72ec437c0a1f13dcbf6bb6318f14566 Mon Sep 17 00:00:00 2001 From: Christopher Mayor Date: Mon, 27 Apr 2026 11:01:30 -0700 Subject: [PATCH] fix #12: add missing session fields ipAddress and userAgent to Drizzle schema --- src/lib/db/schema.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/db/schema.ts b/src/lib/db/schema.ts index 42856d4..ba914c5 100644 --- a/src/lib/db/schema.ts +++ b/src/lib/db/schema.ts @@ -51,8 +51,10 @@ export const sessions = pgTable("sessions", { .references(() => users.id, { onDelete: "cascade" }), token: text("token").notNull().unique(), expiresAt: timestamp("expires_at").notNull(), - createdAt: timestamp("created_at").defaultNow().notNull(), - updatedAt: timestamp("updated_at").defaultNow().notNull(), + ipAddress: text("ip_address"), + userAgent: text("user_agent"), + createdAt: timestamp("created_at", { withTimezone: true }).defaultNow().notNull(), + updatedAt: timestamp("updated_at", { withTimezone: true }).defaultNow().notNull(), }); export const comparisons = pgTable(