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