Unable to use native database types with Prisma and CockroachDB #14176
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
team/schema
Issue for team Schema.
topic: cockroachdb
topic: native database types
Milestone
Bug description
I had opened my Prisma schema on a new machine with my editor configured. The schema I was using is attached below.
You can ignore most of the schema -- the only important part is the
Question
model as the type of thecontent
model wasVARCHAR(100)
. The Prisma extension gave me an error, which saidInvalid Native type VarChar
.This seems like something which has happened after I updated Prisma to v4.0.0 as everything was working fine before. If I remove the
@db.VarChar(100)
and keep it to just a string, I'm unable to run the migration because it changes the type of the column.How to reproduce
String
with@db.VarChar(100)
Expected behavior
I would expect that I can use the native database type
@db.VarChar
by default without any errors, as in the documentation about 'Supported database types and features' it clearly shows us that we can use it.Prisma information
Environment & setup
Prisma Version
Note, this is inside of a GitHub Codespace
The text was updated successfully, but these errors were encountered: