Prisma p.account.create() error "Column: for"

When I sign in with discord, it works fine, when I sign in with spotify, I get this error: "The provided value for the column is too long for the column's type. Column: for" I dont have a column "for" in my schema. Prisma creates a new user table, but cant create an account for the user. I just switched from SQLite to MySQL, I know the solution would be to make the "for" column longer, but I dont know where the "for" column is
1 Reply
skuse
skuseOP2y ago
I've sorted it out. The spotify access token is 260 characters long, and was exceeding the character limit. Same as my scopes. I added @db.Text to the fields and this fixed my problem model Account { id String @id @default(cuid()) userId String type String provider String providerAccountId String refresh_token String? access_token String? @db.Text expires_at BigInt? token_type String? scope String? @db.Text id_token String? session_state String? user User @relation(fields: [userId], references: [id], onDelete: Cascade) @@unique([provider, providerAccountId]) }
Want results from more Discord servers?
Add your server