[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: add missing indices
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: add missing indices |
Date: |
Fri, 07 Aug 2020 15:32:16 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new d436163 add missing indices
d436163 is described below
commit d4361631fd23560c1cd5aa4d0a3458c37b22d42c
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Aug 7 15:08:20 2020 +0200
add missing indices
---
src/backenddb/merchant-0001.sql | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/backenddb/merchant-0001.sql b/src/backenddb/merchant-0001.sql
index deb06e1..0adc495 100644
--- a/src/backenddb/merchant-0001.sql
+++ b/src/backenddb/merchant-0001.sql
@@ -48,7 +48,7 @@ CREATE TABLE IF NOT EXISTS merchant_exchange_signing_keys
,expire_date INT8 NOT NULL
,end_date INT8 NOT NULL
,master_sig BYTEA NOT NULL CHECK (LENGTH(master_sig)=64),
- UNIQUE (master_pub, exchange_pub, start_date)
+ UNIQUE (exchange_pub, start_date, master_pub)
);
COMMENT ON TABLE merchant_exchange_signing_keys
IS 'Here we store proofs of the exchange online signing keys being signed by
the exchange master key';
@@ -160,6 +160,7 @@ COMMENT ON COLUMN merchant_inventory.address
COMMENT ON COLUMN merchant_inventory.next_restock
IS 'GNUnet absolute time indicating when the next restock is expected. 0 for
unknown.';
+
CREATE TABLE IF NOT EXISTS merchant_inventory_locks
(product_serial BIGINT NOT NULL
REFERENCES merchant_inventory (product_serial) -- NO "ON DELETE CASCADE":
locks prevent deletion!
@@ -451,6 +452,17 @@ COMMENT ON COLUMN merchant_tip_reserves.tips_committed_val
IS 'Amount of outstanding approved tips that have not been picked up';
COMMENT ON COLUMN merchant_tip_reserves.tips_picked_up_val
IS 'Total amount tips that have been picked up from this reserve';
+CREATE INDEX IF NOT EXISTS
merchant_tip_reserves_by_reserve_pub_and_merchant_serial
+ ON merchant_tip_reserves
+ (reserve_pub,merchant_serial,creation_time);
+CREATE INDEX IF NOT EXISTS
merchant_tip_reserves_by_merchant_serial_and_creation_time
+ ON merchant_tip_reserves
+ (merchant_serial,creation_time);
+CREATE INDEX IF NOT EXISTS merchant_tip_reserves_by_exchange_balance
+ ON merchant_tip_reserves
+ (exchange_initial_balance_val,exchange_initial_balance_frac);
+
+
CREATE TABLE IF NOT EXISTS merchant_tip_reserve_keys
(reserve_serial BIGINT NOT NULL UNIQUE
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: add missing indices,
gnunet <=