This commit is contained in:
2026-02-04 12:51:41 +00:00
parent 4fdbfb0fb3
commit f1e13f87f6
19 changed files with 722 additions and 67 deletions

View File

@@ -221,6 +221,24 @@ const schema = defineSchema({
})
.index("by_project_status", ["projectId", "status"])
.index("by_project_createdAt", ["projectId", "createdAt"]),
logs: defineTable({
level: v.union(
v.literal("debug"),
v.literal("info"),
v.literal("warn"),
v.literal("error")
),
message: v.string(),
labels: v.array(v.string()),
payload: v.optional(v.any()),
source: v.optional(v.string()),
requestId: v.optional(v.string()),
projectId: v.optional(v.id("projects")),
userId: v.optional(v.id("users")),
createdAt: v.number(),
})
.index("by_createdAt", ["createdAt"])
.index("by_project_createdAt", ["projectId", "createdAt"]),
});
export default schema;