I'm using Prisma to define a schema, and planetscale to host the DB. this means using the mysql driver with prisma.
I would like to use JSON types, but can't seem to get them to work
planetscale supports it for mysql https://planetscale.com/blog/the-mysql-json-data-type
prisma supports it for mysql https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields
but doesn't seem to work together?
is planetscale same as MySql? or different? not listed here: https://www.prisma.io/docs/reference/database-reference/database-features and it says to use the mysql driver.
https://www.prisma.io/docs/guides/database/using-prisma-with-planetscale#what-is-planetscale.
After adding a field to my schema:
model Tune {
cloudFiles Json? // source cloud files
...
I do prisma generate
and prisma dbpush
without problems.
But on trying to use the field I get the error:
Object literal may only specify known properties, and 'cloudFiles' does not exist in type 'Without<TuneUncheckedCreateInput, TuneCreateInput> & TuneCreateInput'.ts(2322)
and digging through the generated prisma types export type TuneCreateInput = {
doesn't have any mention of the cloudFiles
JSON field I tried to add.
So, not sure if I'm doing something wrong or just these different systems aren't interacting together properly?