I developed a backend using Prisma as ORM. Recently I had to truncate (more than once) some tables.
I did it directly with SQL queries, so I'm thinking to include a truncate option to the Delete endpoint.
It's recommended to do that? I'm asking overall because of possibly security issues.
If so, what's better, a $queryRaw with a truncate or a deleteMany({where: {}}).
I know if I want to delete CASCADE I have to add it to the ON DELETE on the foreign keys.