diff --git a/src/queries/prisma/user.ts b/src/queries/prisma/user.ts index 9b471787e4..0c8e3520de 100644 --- a/src/queries/prisma/user.ts +++ b/src/queries/prisma/user.ts @@ -171,6 +171,9 @@ export async function deleteUser( client.eventData.deleteMany({ where: { websiteId: { in: websiteIds } }, }), + client.sessionData.deleteMany({ + where: { websiteId: { in: websiteIds } }, + }), client.websiteEvent.deleteMany({ where: { websiteId: { in: websiteIds } }, }), diff --git a/src/queries/prisma/website.ts b/src/queries/prisma/website.ts index 0814a137b6..c24cdd0d23 100644 --- a/src/queries/prisma/website.ts +++ b/src/queries/prisma/website.ts @@ -164,6 +164,9 @@ export async function resetWebsite( client.eventData.deleteMany({ where: { websiteId }, }), + client.sessionData.deleteMany({ + where: { websiteId }, + }), client.websiteEvent.deleteMany({ where: { websiteId }, }), @@ -195,6 +198,9 @@ export async function deleteWebsite( client.eventData.deleteMany({ where: { websiteId }, }), + client.sessionData.deleteMany({ + where: { websiteId }, + }), client.websiteEvent.deleteMany({ where: { websiteId }, }),