gnunet-svn
[Top][All Lists]
Advanced

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

[taler-donau] branch master updated: [db] added missing file


From: gnunet
Subject: [taler-donau] branch master updated: [db] added missing file
Date: Mon, 08 Jan 2024 11:49:00 +0100

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

johannes-casaburi pushed a commit to branch master
in repository donau.

The following commit(s) were added to refs/heads/master by this push:
     new 04f3079  [db] added missing file
04f3079 is described below

commit 04f307911c442889db523c0bfd9556477ca2f71e
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
AuthorDate: Mon Jan 8 11:48:21 2024 +0100

    [db] added missing file
---
 src/donau-tools/donau-dbinit.c |  5 +++--
 src/donaudb/.gitignore         |  2 --
 src/donaudb/Makefile.am        |  8 ++++++++
 src/donaudb/donau-0002.sql.in  | 41 +++++++++++++++++++++++++++++++++++++++++
 src/donaudb/procedures.sql.in  | 27 ---------------------------
 src/include/donau_util.h       |  2 +-
 6 files changed, 53 insertions(+), 32 deletions(-)

diff --git a/src/donau-tools/donau-dbinit.c b/src/donau-tools/donau-dbinit.c
index b29691b..a5fe25e 100644
--- a/src/donau-tools/donau-dbinit.c
+++ b/src/donau-tools/donau-dbinit.c
@@ -38,7 +38,7 @@ static int reset_db;
 /**
  * -s option: clear revolving shard locks
  */
-static int clear_shards;
+// static int clear_shards;
 
 /**
  * -g option: garbage collect DB reset
@@ -104,7 +104,8 @@ run (void *cls,
     global_ret = EXIT_NOPERMISSION;
     return;
   }
-  if (gc_db || clear_shards)
+  // if (gc_db || clear_shards)
+  if (gc_db)
   {
     if (GNUNET_OK !=
         plugin->preflight (plugin->cls))
diff --git a/src/donaudb/.gitignore b/src/donaudb/.gitignore
index c180575..a604c7f 100644
--- a/src/donaudb/.gitignore
+++ b/src/donaudb/.gitignore
@@ -6,11 +6,9 @@ perf_reserves_in_insert-postgres
 perf_select_refunds_by_coin-postgres
 donau-0002.sql
 procedures.sql
-donau-0003.sql
 perf-donaudb-reserves-in-insert-postgres
 test-donaudb-batch-reserves-in-insert-postgres
 test-donaudb-by-j-postgres
 test-donaudb-populate-link-data-postgres
 test-donaudb-populate-ready-deposit-postgres
 test-donaudb-populate-select-refunds-by-coin-postgres
-donau-0004.sql
diff --git a/src/donaudb/Makefile.am b/src/donaudb/Makefile.am
index 4553ef9..98a8aea 100644
--- a/src/donaudb/Makefile.am
+++ b/src/donaudb/Makefile.am
@@ -16,12 +16,15 @@ sqldir = $(prefix)/share/donau/sql/donau/
 
 sqlinputs = \
   donau_do_*.sql \
+  0002-*.sql \
+  donau-0002.sql \
   procedures.sql.in
 
 sql_DATA = \
   versioning.sql \
   donau-0001.sql \
   drop.sql \
+  donau-0002.sql \
   procedures.sql
 
 BUILT_SOURCES = \
@@ -37,6 +40,11 @@ procedures.sql: procedures.sql.in donau_do_*.sql
        gcc -E -P -undef - < procedures.sql.in 2>/dev/null | sed -e "s/--.*//" 
| awk 'NF' - >$@
        chmod ugo-w $@
 
+donau-0002.sql: donau-0002.sql.in 0002-*.sql
+       chmod +w $@ || true
+       gcc -E -P -undef - < donau-0002.sql.in 2>/dev/null | sed -e "s/--.*//" 
| awk 'NF' - >$@
+       chmod ugo-w $@
+
 check_SCRIPTS = \
   test_idempotency.sh
 
diff --git a/src/donaudb/donau-0002.sql.in b/src/donaudb/donau-0002.sql.in
new file mode 100644
index 0000000..25a9ea3
--- /dev/null
+++ b/src/donaudb/donau-0002.sql.in
@@ -0,0 +1,41 @@
+--
+-- This file is part of TALER
+-- Copyright (C) 2014--2023 Taler Systems SA
+--
+-- TALER is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 3, or (at your option) any later version.
+--
+-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
FOR
+-- A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License along with
+-- TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
+--
+
+BEGIN;
+
+SELECT _v.register_patch('donau-0002', NULL, NULL);
+SET search_path TO donau;
+
+CREATE DOMAIN gnunet_hashcode
+  AS BYTEA
+  CHECK(LENGTH(VALUE) = 32);
+
+CREATE TYPE taler_amount
+  AS
+  (val INT8
+  ,frac INT4
+  );
+COMMENT ON TYPE taler_amount
+  IS 'Stores an amount, fraction is in units of 1/100000000 of the base value';
+
+#include "0002-donation_units.sql"
+#include "0002-donau_charities.sql"
+#include "0002-donau_history.sql"
+#include "0002-donau_receipts_issued.sql"
+#include "0002-donau_receipts_submitted.sql"
+#include "0002-donau_sign_keys.sql"
+
+COMMIT;
diff --git a/src/donaudb/procedures.sql.in b/src/donaudb/procedures.sql.in
index 0a3ae5e..f93f4b5 100644
--- a/src/donaudb/procedures.sql.in
+++ b/src/donaudb/procedures.sql.in
@@ -18,33 +18,6 @@ BEGIN;
 
 SET search_path TO donau;
 
-#include "donau_do_amount_specific.sql"
-#include "donau_do_withdraw.sql"
-#include "donau_do_batch_withdraw.sql"
-#include "donau_do_batch_withdraw_insert.sql"
-#include "donau_do_age_withdraw.sql"
-#include "donau_do_recoup_by_reserve.sql"
-#include "donau_do_deposit.sql"
-#include "donau_do_melt.sql"
-#include "donau_do_refund.sql"
-#include "donau_do_recoup_to_reserve.sql"
-#include "donau_do_recoup_to_coin.sql"
 #include "donau_do_gc.sql"
-#include "donau_do_purse_delete.sql"
-#include "donau_do_purse_deposit.sql"
-#include "donau_do_purse_merge.sql"
-#include "donau_do_reserve_purse.sql"
-#include "donau_do_expire_purse.sql"
-#include "donau_do_history_request.sql"
-#include "donau_do_reserve_open_deposit.sql"
-#include "donau_do_reserve_open.sql"
-#include "donau_do_insert_or_update_policy_details.sql"
-#include "donau_do_insert_aml_decision.sql"
-#include "donau_do_insert_aml_officer.sql"
-#include "donau_do_insert_kyc_attributes.sql"
-#include "donau_do_reserves_in_insert.sql"
-#include "donau_do_batch_reserves_update.sql"
-#include "donau_do_get_link_data.sql"
-#include "donau_do_batch_coin_known.sql"
 
 COMMIT;
diff --git a/src/include/donau_util.h b/src/include/donau_util.h
index 5b84fc4..1ee4af6 100644
--- a/src/include/donau_util.h
+++ b/src/include/donau_util.h
@@ -37,7 +37,7 @@ DONAU_project_data_default (void);
 
 
 /**
- * Initialize libtalerutil.
+ * Initialize libdonauutil.
  */
 void
 DONAU_OS_init (void);

-- 
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]