Skip to content
Discussion options

You must be logged in to vote

Hey @TheoMer 👋
I think the issue is because of updatedAt and not createdAt. createdAt already has a default value so it is not required to be passed while creating, but you would need to add this to the schema for automatic insertion of updated time.

model Item {
  createdAt       DateTime       @default(now())
  updatedAt       DateTime      @updatedAt
  itemvariants    ItemVariants[]
}

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by TheoMer
Comment options

You must be logged in to vote
2 replies
@ryands17
Comment options

@TheoMer
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants