dka 🐻⛓ A6K3R-CFAC
PPrisma
•Created by dka 🐻⛓ A6K3R-CFAC on 8/19/2024 in #help-and-questions
How to have @createdBy and @updatedBy annotation in prisma schema (like @updatedAt)
In a nestjs and prisma api, I would like to add audit columns to my database.
Writting the mapping to get the
user.id
in each create/update method of each of my entities is cumbursome. In spring data rest, this is how they do auditing:
In prisma for example, I can use @updatedAt
annotation in my schema to have the updatedData columns without writing code.
I would like to have @createdBy
and @updatedBy
audit annotation, either in prisma or in my nestJS code to audit the connected user.id who made the creation or modification of a row.
How is this possible?1 replies
PPrisma
•Created by dka 🐻⛓ A6K3R-CFAC on 7/4/2024 in #help-and-questions
yarn 4
Does yarn prisma generate works with yarn 4 ? If so, how ?
2 replies
PPrisma
•Created by dka 🐻⛓ A6K3R-CFAC on 7/4/2024 in #help-and-questions
Cannot generate prisma client in monorepo
I am in the middle of upgrade to yarn v1 to yarn v4 as I was struggling with the linking of dependency using lerna v1.
Since, I am unable to generate my prisma client, and the erreor is very (very) broad.
I have been following all the advices from GitHub to the discord bot here.
I have already created a new project and move my code little by little, this is kind of a dead end for me and my project.
Can anyone enlight me about that error ?
Thanks
2 replies