From 4441fbd459ee1f13ae644769fdc9d24d8f3a805f Mon Sep 17 00:00:00 2001 From: NotAmaia <012.sva@gmail.com> Date: Sun, 1 Sep 2024 23:57:56 -0700 Subject: [PATCH] website not working with old schema so changed back to original --- convex/schema.ts | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/convex/schema.ts b/convex/schema.ts index 0af65ad..3d5867e 100644 --- a/convex/schema.ts +++ b/convex/schema.ts @@ -1,28 +1,14 @@ import { defineSchema, defineTable } from "convex/server"; import { v } from "convex/values"; -// const chatMessageSchema = defineTable({ -// msg: v.string(), -// type: v.string(), // Defines whether it's the chatbot or user's message -// }); - export default defineSchema({ - message: defineTable({ - msg: v.string(), - userId: v.string(), - type: v.string(), // defines whether it's the chatbot or user's message - }) - .index("byUserId",["userId"]), - - // userHistory: defineTable({ users: defineTable({ userName: v.string(), clerkId: v.string(), // this the Clerk ID, stored in the subject JWT field - chatHistory: v.any(), - // chatHistory: v.array(v.object({ - // type: v.string(), // defines whether it's the chatbot or user's message - // text: v.string(), - // })), + chatHistory: v.array(v.object({ + type: v.string(), // defines whether it's the chatbot or user's message + text: v.string(), + })), }).index("byClerkId", ["clerkId"]), -}); +}); \ No newline at end of file