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.sql9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/auditordb/drop.sql b/src/auditordb/drop.sql
index 37a50ee68..4bae66103 100644
--- a/src/auditordb/drop.sql
+++ b/src/auditordb/drop.sql
@@ -17,9 +17,14 @@
-- Everything in one big transaction
BEGIN;
+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 versioning (auditor-0001.sql)
-SELECT _v.unregister_patch('auditor-0001');
DROP SCHEMA auditor CASCADE;
-- And we're out of here...