Skip to content

Commit

Permalink
fix(project): fix project deletion with build reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Jan 5, 2025
1 parent f5d6807 commit cb84068
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/backend/src/graphql/services/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { TransactionOrKnex } from "objection";
import {
Build,
BuildNotification,
BuildReview,
Capture,
Crawl,
Project,
Expand Down Expand Up @@ -76,6 +77,10 @@ export async function unsafe_deleteProject(args: {
.joinRelated("build")
.where("build.projectId", args.projectId)
.delete();
await BuildReview.query(trx)
.joinRelated("build")
.where("build.projectId", args.projectId)
.delete();
await Build.query(trx).where("projectId", args.projectId).delete();
await ScreenshotBucket.query(trx)
.where("projectId", args.projectId)
Expand Down

0 comments on commit cb84068

Please sign in to comment.