Planetscale - New field with default(uuid) erroring out?
This is a new addition to my database, I can't seem to sync my planetscale database with this as it errors out, I also tried with
@unique
removed and with cuid()
.
Field 'apikey' doesn't have a default value (errno 1364) (sqlstate HY000) during query: insert into Server
Googling error with 'planetscale' doesn't help. Thier help support has nothing either.. HELP!Solution:Jump to solution
FIXED!
Terrifying though, unsure if correct.
I updated the database to have the apikey field.
String?
. ...2 Replies
This is what planetscale is telling me, but it doesn't have the default value.. why?
apikey String @unique @default("")
This works correctly in the schema Solution
FIXED!
Terrifying though, unsure if correct.
I updated the database to have the apikey field.
String?
.
Then added back the schema to my dev
branch in preperation.
Manually connected to my main
db, updated existing values with raw SQL
Then synced the dev
branch. Fixed.