question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in migration engine. Reason: called `Result::unwrap()` on an `Err` value: Error("unknown variant `Text`, expected one of `Bit`, `Bool`, `Bytes`, `Char`, `Date`, `Decimal`, `Float4`, `Float8`, `Inet`, `Int2`, `Int4`, `Int8`, `JsonB`, `Oid`, `CatalogSingleChar`, `String`, `Time`, `Timestamp`, `Timestamptz`, `Timetz`, `Uuid`, `VarBit`", line: 0, column: 0)

See original GitHub issue

This sounds like a misalignment between a local schema.prisma file and the actual DB schema that generates a confusing error message about native types.

Command: prisma migrate dev Version: 4.2.1 Binary Version: 2920a97877e12e055c1333079b8d19cee7f33826 Report: https://prisma-errors.netlify.app/report/14264 OS: arm64 darwin 21.6.0

JS Stacktrace:

Error: Error in migration engine.
Reason: [/Users/runner/work/prisma-engines/prisma-engines/libs/sql-schema-describer/src/walkers.rs:126:60] called `Result::unwrap()` on an `Err` value: Error("unknown variant `Text`, expected one of `Bit`, `Bool`, `Bytes`, `Char`, `Date`, `Decimal`, `Float4`, `Float8`, `Inet`, `Int2`, `Int4`, `Int8`, `JsonB`, `Oid`, `CatalogSingleChar`, `String`, `Time`, `Timestamp`, `Timestamptz`, `Timetz`, `Uuid`, `VarBit`", line: 0, column: 0)

Please create an issue with your `schema.prisma` at
https://github.com/prisma/prisma/issues/new

    at handlePanic (/node_modules/prisma/build/index.js:92130:25)
    at ChildProcess.<anonymous> (/node_modules/prisma/build/index.js:92139:15)
    at ChildProcess.emit (node:events:527:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)

Rust Stacktrace:

Starting migration engine RPC server
Connecting to user-provided shadow database.
Attempting best_effort_reset
Connecting to user-provided shadow database.
Attempting best_effort_reset
Attempting best_effort_reset
Analysis run in 417ms
Applying `20220825152323_init`
Connecting to user-provided shadow database.
Attempting best_effort_reset
[/Users/runner/work/prisma-engines/prisma-engines/libs/sql-schema-describer/src/walkers.rs:126:60] called `Result::unwrap()` on an `Err` value: Error("unknown variant `Text`, expected one of `Bit`, `Bool`, `Bytes`, `Char`, `Date`, `Decimal`, `Float4`, `Float8`, `Inet`, `Int2`, `Int4`, `Int8`, `JsonB`, `Oid`, `CatalogSingleChar`, `String`, `Time`, `Timestamp`, `Timestamptz`, `Timetz`, `Uuid`, `VarBit`", line: 0, column: 0)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pimeyscommented, Dec 15, 2022

It needs types we do not support in the cockroach connector. For example, TEXT. It would be nice to give a good error here, but I have no idea how common it is that people do this.

0reactions
janpiocommented, Dec 14, 2022

So provider=cockroach but talking to a PostgreSQL 15 and then just db pull leads to this problem? Does it need a specific schema in the database? Or any existing local schema file?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Map unified types to source and destination data types
The mappings between the Datastream unified types and the BigQuery data types. Datastream unified types. Type name, Info, Avro definition, JSON definition.
Read more >
MySQL 5.7.12 import cannot create a JSON value from a ...
I asked one of my friend to generate an SQL dump for me to import. ... but converting all binary values created a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found