Documentation Index
Fetch the complete documentation index at: https://planetscale.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
What this error means
INVALID_VSCHEMA means the Vitess VSchema is invalid JSON, does not match the expected VSchema shape, or is inconsistent with the SQL schema.
The error usually points to the affected VSchema path, table, or vindex. Use that context to find the exact VSchema entry that failed validation.
Common messages include:
Why PlanetScale rejects it
Vitess uses VSchema to route queries, map rows to shards, define vindexes, configure lookup vindexes, and manage sequences. If VSchema is inconsistent with the SQL schema, Vitess may route queries incorrectly or make data inaccessible.How to fix it
Use the highlighted VSchema path or the table and vindex named in the message to find the failing VSchema entry. Then check these common causes:- The table named in VSchema also exists in the SQL schema.
- Every
column_vindexesentry references an existing vindex. - Every column used by a vindex exists in the SQL table.
- The vindex type matches the column type. Numeric columns should use
hashorxxhash; text columns should useunicode_loose_md5orunicode_loose_xxhash; binary columns should usebinary_md5. - Sequence tables exist in SQL, are declared in VSchema as
type: "sequence", and contain integerid,next_id, andcachecolumns. - Existing primary column vindexes are not changed in a way that would make existing rows inaccessible.

