diff --git a/pkgs/utils/query.ts b/pkgs/utils/query.ts index dd351ae..7fdad27 100644 --- a/pkgs/utils/query.ts +++ b/pkgs/utils/query.ts @@ -96,12 +96,13 @@ export const execQuery = async (args: DBArg, prisma: any) => { } if (inserts.length > 0) { - transactions.push( - prisma[table].createMany({ - data: inserts, - skipDuplicates: true, - }) - ); + for (const row of inserts) { + transactions.push( + prisma[table].create({ + data: row, + }) + ); + } } if (updates.length > 0) {