Is there a way to configure prisma to create date ...
# prisma-client
n
Is there a way to configure prisma to create date columns (createdOn, updatedOn) on models defined in the schema without having to explicitly create them?
s
Are you wanting something like these?
Copy code
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
These will populate the createdAt field when a record is created and updatedAt will automatically be given a fresh time stamp anytime the record is updated
n
Yeah perfect, thank you
👍 1