-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
* cleanTables now uses truncate instead of deleteMany #150
Conversation
# Conflicts: # packages/app/prisma-utils/src/index.ts
|
||
for (const delegate of delegates) { | ||
await delegate.deleteMany() | ||
async cleanTables(prisma: PrismaClient) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it better to only clear the necessary subset of given tables, from perf perspective?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, overoptimized the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it looks to me, that we can simply expose one function without a class:) Unless we want to enclose the schema
Changes
Please describe
Checklist
major
,minor
,patch
orskip-release