Skip to content

Commit

Permalink
repo not working with changed schema
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAmaia committed Sep 2, 2024
1 parent 4f69dba commit a6e5e8c
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions convex/schema.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
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.array(v.object({
type: v.string(), // defines whether it's the chatbot or user's message
text: v.string(),
})),
chatHistory: v.any(),
// chatHistory: v.array(v.object({
// type: v.string(), // defines whether it's the chatbot or user's message
// text: v.string(),
// })),
}).index("byClerkId", ["clerkId"]),

});

0 comments on commit a6e5e8c

Please sign in to comment.