Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: Remove build logs in case of app removed

Andras Bacsai35384deb680f
diff --git a/src/lib/database/applications.ts b/src/lib/database/applications.ts
index e6679d3659..2dab7b46c1 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 } } } });
}