gnunet-svn
[Top][All Lists]
Advanced

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

[taler-donau] branch master updated: DB update


From: gnunet
Subject: [taler-donau] branch master updated: DB update
Date: Tue, 10 Oct 2023 16:04:29 +0200

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

grothoff pushed a commit to branch master
in repository donau.

The following commit(s) were added to refs/heads/master by this push:
     new b49f8d7  DB update
b49f8d7 is described below

commit b49f8d7066b47bdf55b193bbd57ef05a2fa44abb
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Tue Oct 10 16:04:26 2023 +0200

    DB update
---
 src/donaudb/0002-donation_unit_revocations.sql | 2 ++
 src/donaudb/0002-donation_units.sql            | 9 +++------
 src/donaudb/0002-donau_charities.sql           | 1 +
 src/donaudb/0002-donau_receipts_issued.sql     | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/donaudb/0002-donation_unit_revocations.sql 
b/src/donaudb/0002-donation_unit_revocations.sql
index a087da8..c763e44 100644
--- a/src/donaudb/0002-donation_unit_revocations.sql
+++ b/src/donaudb/0002-donation_unit_revocations.sql
@@ -20,3 +20,5 @@ CREATE TABLE IF NOT EXISTS donation_unit_revocations
   );
 COMMENT ON TABLE donation_unit_revocations
   IS 'remembering which donation_unit keys have been revoked';
+
+-- FIXME: probably leave out revocation for now.
diff --git a/src/donaudb/0002-donation_units.sql 
b/src/donaudb/0002-donation_units.sql
index 56cb9ad..18c7245 100644
--- a/src/donaudb/0002-donation_units.sql
+++ b/src/donaudb/0002-donation_units.sql
@@ -18,15 +18,12 @@ CREATE TABLE donation_units
   (donation_unit_serial BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE
   ,donation_unit_pub_hash BYTEA PRIMARY KEY CHECK 
(LENGTH(donation_unit_pub_hash)=64)
   ,donation_unit_pub BYTEA NOT NULL
-  ,valid_from INT8 NOT NULL
-  ,expire_legal INT8 NOT NULL
+  ,validity_year INT4 NOT NULL
   ,donation_unit taler_amount NOT NULL
   );
 COMMENT ON TABLE donation_units
   IS 'Main donation_unit table. All the valid donation_unit the exchange knows 
about.';
-COMMENT ON COLUMN donation_units.donation_unit_serial
-  IS 'needed for exchange-auditor replication logic';
 
-CREATE INDEX donation_units_by_expire_legal_index
+CREATE INDEX donation_units_by_expire
   ON donation_units
-  (expire_legal);
+  (validity_year);
diff --git a/src/donaudb/0002-donau_charities.sql 
b/src/donaudb/0002-donau_charities.sql
index 023f980..49cba77 100644
--- a/src/donaudb/0002-donau_charities.sql
+++ b/src/donaudb/0002-donau_charities.sql
@@ -16,6 +16,7 @@
 
 CREATE TABLE charities
   (charity_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE
+  ,charity_name TEXT NOT NULL
   ,charity_pub BYTEA PRIMARY KEY CHECK (LENGTH(donau_pub)=32)
   ,max_per_year taler_amount NOT NULL
   ,receipts_to_date taler_amount NOT NULL
diff --git a/src/donaudb/0002-donau_receipts_issued.sql 
b/src/donaudb/0002-donau_receipts_issued.sql
index 3457c0a..15ed7cf 100644
--- a/src/donaudb/0002-donau_receipts_issued.sql
+++ b/src/donaudb/0002-donau_receipts_issued.sql
@@ -18,7 +18,7 @@ CREATE TABLE receipts_issued
   (receipt_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE
   ,charity_sig BYTEA CHECK (LENGTH(charity_sig)=64)
   ,charity_id BIGINT NOT NULL REFERENCES charities (charity_id) ON DELETE 
CASCADE
-  ,receipt_hash BYTEA NOT NULL
+  ,receipt_hash BYTEA NOT NULL CHECK (LENGTH(receipt_hash)=64)
   ,amount taler_amount NOT NULL
   );
 COMMENT ON TABLE receipts_issued

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