feat(04-01): add categoryId to threads schema, Zod schemas, and test helper
- Add categoryId column with FK to categories on threads table - Update createThreadSchema to require categoryId - Update updateThreadSchema to allow optional categoryId - Update test helper CREATE TABLE to include category_id Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,9 @@ export const threads = sqliteTable("threads", {
|
||||
name: text("name").notNull(),
|
||||
status: text("status").notNull().default("active"),
|
||||
resolvedCandidateId: integer("resolved_candidate_id"),
|
||||
categoryId: integer("category_id")
|
||||
.notNull()
|
||||
.references(() => categories.id),
|
||||
createdAt: integer("created_at", { mode: "timestamp" })
|
||||
.notNull()
|
||||
.$defaultFn(() => new Date()),
|
||||
|
||||
Reference in New Issue
Block a user