aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/0003-withdraw_age_commitments.sql
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-01-11 17:21:16 +0100
committerÖzgür Kesim <oec-taler@kesim.org>2023-01-11 17:21:22 +0100
commiteafe3435e99870d93c8b6adf457f4c4c9e050415 (patch)
treea50af60153d4b66be027b3cd15e4d2d2cce9065f /src/exchangedb/0003-withdraw_age_commitments.sql
parent8992c30631b14fe3fa8b2bfb7b7b3c7e493d9113 (diff)
adjust partition and primary keys commitments and reveals in withdraw-age
Diffstat (limited to 'src/exchangedb/0003-withdraw_age_commitments.sql')
-rw-r--r--src/exchangedb/0003-withdraw_age_commitments.sql7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/exchangedb/0003-withdraw_age_commitments.sql b/src/exchangedb/0003-withdraw_age_commitments.sql
index f6f8b44d..1aac8bb2 100644
--- a/src/exchangedb/0003-withdraw_age_commitments.sql
+++ b/src/exchangedb/0003-withdraw_age_commitments.sql
@@ -36,7 +36,7 @@ BEGIN
',timestamp INT8 NOT NULL'
') %s ;'
,table_name
- ,'PARTITION BY HASH (h_commitment)'
+ ,'PARTITION BY HASH (reserve_pub)'
,partition_suffix
);
PERFORM comment_partitioned_table(
@@ -96,9 +96,8 @@ BEGIN
table_name = concat_ws('_', table_name, partition_suffix);
EXECUTE FORMAT (
- 'CREATE INDEX ' || table_name || '_by_reserve_pub'
- ' ON ' || table_name ||
- ' (reserve_pub);'
+ 'ALTER TABLE ' || table_name ||
+ ' ADD PRIMARY KEY (h_commitment, reserve_pub);'
);
EXECUTE FORMAT (
'ALTER TABLE ' || table_name ||