gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: improve drop.sql to avoid having


From: gnunet
Subject: [taler-exchange] branch master updated: improve drop.sql to avoid having to update it whenever new SQL revisions are added
Date: Sat, 09 Mar 2024 21:02:34 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 904a15ee improve drop.sql to avoid having to update it whenever new 
SQL revisions are added
904a15ee is described below

commit 904a15eec6884f049d70dfdb7043f8aed3bbebc0
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Mar 9 21:02:31 2024 +0100

    improve drop.sql to avoid having to update it whenever new SQL revisions 
are added
---
 src/auditordb/drop.sql  | 10 ++++++++--
 src/exchangedb/drop.sql | 13 +++++++++----
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/src/auditordb/drop.sql b/src/auditordb/drop.sql
index 20bc192c..4bae6610 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...
diff --git a/src/exchangedb/drop.sql b/src/exchangedb/drop.sql
index fa7609bf..b7583f79 100644
--- a/src/exchangedb/drop.sql
+++ b/src/exchangedb/drop.sql
@@ -17,14 +17,19 @@
 -- Everything in one big transaction
 BEGIN;
 
--- TODO: consider use exchange-* in the future!
-SELECT _v.unregister_patch('exchange-0001');
-SELECT _v.unregister_patch('exchange-0002');
+WITH xpatches AS (
+  SELECT patch_name
+  FROM _v.patches
+  WHERE starts_with(patch_name,'exchange-')
+)
+  SELECT _v.unregister_patch(xpatches.patch_name)
+  FROM xpatches;
+
 
 WITH xpatches AS (
   SELECT patch_name
   FROM _v.patches
-  WHERE patch_name='auditor-triggers-0001' -- TODO: use auditor-triggers-* in 
the future!
+  WHERE starts_with(patch_name,'auditor-triggers-')
 )
   SELECT _v.unregister_patch(xpatches.patch_name)
   FROM xpatches;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]