on-internet
← Community

Prisma migration needs default value?

Stack Overflow ·

I'm having a problem with Prisma data modeling give tried almost everything but i still don't get what this error is giving me. It says that table needs a default value when I already have given it a ID then i tried to remove the relation name same thing happens here my model: model UserToUser { id Int @id @default(autoincrement()) userId Int? follower User? @relation("follower",fields: [userId], references: [id]) following User @relation("following", fields: [followingId], references: [id]) followingId Int } Then it gives me an error saying "Step 2 Added the required column followingId to the

Comments

Sign in or sign up to comment and upvote.

No comments yet.