ginodrose - Tap2G
Convex Community2mo ago
2 replies
ginodrose - Tap2

Failed to import Prod to Dev due to crons component validation

I’m trying to export my prod Convex DB and import it into dev, but I’m consistently blocked by schema validation on the crons component table.

What I’m doing

Export from prod:
npx convex export --prod --path prod-data.zip

Import into dev (empty DB):
npx convex import --replace-all prod-data.zip

The error

Even though my dev DB is empty, I get:

Hit an error while importing:
Failed to insert or update a document in table "crons" because it does not match the schema: Value does not match validator.
Path: .schedulerJobId
Value: "kc2358c11gms18ajcbsedrjgn57xxxxx"
Validator: v.id("_scheduled_functions")

At first I thought this was my own schema, but I tracked it down:
this crons table and schedulerJobId field are coming from the crons component, not from any schema I control.

What I tried

To get around schema validation, I changed my convex/schema.ts to:

import { defineSchema } from "convex/server";
// ...my tables and the crons component

export default defineSchema(
  {
    // all tables, including crons component tables
  },
  {
    schemaValidation: false,
  },
);


Then I ran npx convex dev / npx convex deploy for the dev deployment I’m importing into, and re-ran:

npx convex import --replace-all prod-data.zip

But I still see the same validation error mentioning:

Validator: v.id("_scheduled_functions")

which suggests the deployment is still enforcing the schedulerJobId: v.id("_scheduled_functions") validator from the crons component, even though I’ve set schemaValidation: false in defineSchema for this deployment. According to the docs, setting schemaValidation: false should skip runtime validation of inserts/updates against validators.

Any help?
Was this page helpful?