Skip to main content

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_ROUTING_RULES means the Vitess routing rules for the schema are invalid or conflict with the target branch during a merge. Common messages include:
table not found
keyspace `target` not found in schema
table "t" must be qualified
table `source.t` has no targets
table `source.t` has more than one target
table "t@rdonly" already routes to different table in destination routing rules and conflicts

Why PlanetScale rejects it

Routing rules tell Vitess how to route queries from one table name to another table. Invalid rules can send traffic to a missing table, an ambiguous keyspace, multiple targets, or a conflicting destination rule.

How to fix it

Use the routing rule location and the full error message to find the failing rule.
  • Qualify table names as <keyspace>.<table>.
  • Verify the target keyspace exists.
  • Verify the target table exists in the SQL schema.
  • Use exactly one target table for each rule.
  • Remove duplicate source table entries.
  • Use only valid tablet-type suffixes, such as @primary, @replica, or @rdonly.
  • If the error is a merge conflict, reconcile the destination branch’s routing rules first, then recreate the deploy request.
Example shape:
{
  "rules": [
    {
      "from_table": "source.orders",
      "to_tables": ["target.orders"]
    }
  ]
}

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.