zoomie | TuloZ
Convex Community2y ago
12 replies
zoomie | Tulo

Partial schema

Is it possible to have a partial schema? I have a table called lead with data in it. The schema is lead: defineTable(v.any()). I want to add an index, so I need to define the fields.

  lead: defineTable({
    latitude: v.optional(v.number()),
    longitude: v.optional(v.number()),
  })

As there is existing data in the table, I'm getting this error:
Document with ID ... in table "lead" does not match the schema: Object contains extra field that is not in the validator.
Was this page helpful?