Session logs and usage logs should use seconds not ms

This commit is contained in:
Owen
2026-08-26 10:50:04 -04:00
parent 3d4e143c1f
commit e57826d6e0
7 changed files with 20 additions and 19 deletions
+1 -1
View File
@@ -1984,7 +1984,7 @@ export const aiSessionLog = pgTable(
// were cut short at AI_SESSION_LOG_MAX_BODY_CHARS before storage.
truncated: boolean("truncated").notNull().default(false),
statusCode: integer("statusCode"),
createdAt: bigint("createdAt", { mode: "number" }).notNull() // epoch ms
createdAt: bigint("createdAt", { mode: "number" }).notNull() // epoch seconds
},
(t) => [
index("idx_ai_session_log_org_created").on(t.orgId, t.createdAt),