summaryrefslogtreecommitdiff
path: root/gentoobrowse-api/service/sql/maintenance
diff options
context:
space:
mode:
Diffstat (limited to 'gentoobrowse-api/service/sql/maintenance')
-rw-r--r--gentoobrowse-api/service/sql/maintenance/packagePrune.sql1
1 files changed, 1 insertions, 0 deletions
diff --git a/gentoobrowse-api/service/sql/maintenance/packagePrune.sql b/gentoobrowse-api/service/sql/maintenance/packagePrune.sql
index 510ed75..5dbb568 100644
--- a/gentoobrowse-api/service/sql/maintenance/packagePrune.sql
+++ b/gentoobrowse-api/service/sql/maintenance/packagePrune.sql
@@ -2,6 +2,7 @@ DELETE FROM gentoobrowse.packages p
USING gentoobrowse.categories c
WHERE p.categoryid = c.categoryid
AND c.name = ?
+AND p.name = ?
AND NOT EXISTS (
SELECT FROM gentoobrowse.ebuilds e
WHERE p.packageid = e.packageid)