PrismaP
Prisma9mo ago
2 replies
orangesidny

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)
}



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
        }
      });


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
Was this page helpful?