From 35384deb680f495725b697f2759912a057a68e59 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sat, 19 Mar 2022 15:06:25 +0100 Subject: [PATCH] fix: Remove build logs in case of app removed --- src/lib/database/applications.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/database/applications.ts b/src/lib/database/applications.ts index e6679d365..2dab7b46c 100644 --- a/src/lib/database/applications.ts +++ b/src/lib/database/applications.ts @@ -64,6 +64,7 @@ export async function removeApplication({ id, teamId }) { await prisma.applicationSettings.deleteMany({ where: { application: { id } } }); await prisma.buildLog.deleteMany({ where: { applicationId: id } }); + await prisma.build.deleteMany({ where: { applicationId: id } }); await prisma.secret.deleteMany({ where: { applicationId: id } }); await prisma.application.deleteMany({ where: { id, teams: { some: { id: teamId } } } }); }