summaryrefslogtreecommitdiff
path: root/src/auditordb/drop.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditordb/drop.sql')
-rw-r--r--src/auditordb/drop.sql10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/auditordb/drop.sql b/src/auditordb/drop.sql
index 20bc192c0..4bae66103 100644
--- a/src/auditordb/drop.sql
+++ b/src/auditordb/drop.sql
@@ -17,8 +17,14 @@
-- Everything in one big transaction
BEGIN;
-SELECT _v.unregister_patch('auditor-0001');
-SELECT _v.unregister_patch('auditor-0002');
+WITH xpatches AS (
+ SELECT patch_name
+ FROM _v.patches
+ WHERE starts_with(patch_name,'auditor-')
+)
+ SELECT _v.unregister_patch(xpatches.patch_name)
+ FROM xpatches;
+
DROP SCHEMA auditor CASCADE;
-- And we're out of here...