Prisma Schema not updating / working

I have created this schema for users
model users {
id Int @id @default(autoincrement())
username String? @db.VarChar(255)
user_id String @unique @map("user_id") @db.VarChar(255)
clerk_id String?
email String @db.VarChar(255)
profile_image String?
bio String?
emailverified Boolean? @default(false)
created_at DateTime? @default(now()) @db.Timestamp(6)
updated_at DateTime? @default(now()) @db.Timestamp(6)
}
model users {
id Int @id @default(autoincrement())
username String? @db.VarChar(255)
user_id String @unique @map("user_id") @db.VarChar(255)
clerk_id String?
email String @db.VarChar(255)
profile_image String?
bio String?
emailverified Boolean? @default(false)
created_at DateTime? @default(now()) @db.Timestamp(6)
updated_at DateTime? @default(now()) @db.Timestamp(6)
}
Then when I go to add data
await prisma.users.create({
data: {
user_id: userId ,
email,
username,
profile_image: profileImage || null,
emailverified: emailVerified || false,
created_at: createdAtDate,
updated_at: updatedAtDate
}
});
await prisma.users.create({
data: {
user_id: userId ,
email,
username,
profile_image: profileImage || null,
emailverified: emailVerified || false,
created_at: createdAtDate,
updated_at: updatedAtDate
}
});
It does not work And this is what it says Argument clerk_id is missing. But I have tried everything and on the studio it has the ? to clerk_id
1 Reply
Prisma AI Help
You're in no rush, so we'll let a dev step in. Enjoy your coffee, or drop into #ask-ai if you get antsy for a second opinion!

Did you find this page helpful?