aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-06-13 09:44:56 +0200
committerChristian Grothoff <christian@grothoff.org>2022-06-13 09:44:56 +0200
commit03cfd2b1e548c24f6572f58d3838f8d5b12c7501 (patch)
tree9828d75ed578687fa3a3b4cf47365735e62c3be8 /src
parent6d16958a5c28c4f96d14aae051f30ffd4df00527 (diff)
-add default(0)
Diffstat (limited to 'src')
-rw-r--r--src/exchangedb/common-0001.sql8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/exchangedb/common-0001.sql b/src/exchangedb/common-0001.sql
index 1e5619db7..ea3b74ecd 100644
--- a/src/exchangedb/common-0001.sql
+++ b/src/exchangedb/common-0001.sql
@@ -104,8 +104,8 @@ BEGIN
'CREATE TABLE IF NOT EXISTS %I'
'(reserve_uuid BIGINT GENERATED BY DEFAULT AS IDENTITY'
',reserve_pub BYTEA PRIMARY KEY CHECK(LENGTH(reserve_pub)=32)'
- ',current_balance_val INT8 NOT NULL'
- ',current_balance_frac INT4 NOT NULL'
+ ',current_balance_val INT8 NOT NULL DEFAULT(0)'
+ ',current_balance_frac INT4 NOT NULL DEFAULT(0)'
',purses_active INT8 NOT NULL DEFAULT(0)'
',purses_allowed INT8 NOT NULL DEFAULT(0)'
',kyc_required BOOLEAN NOT NULL DEFAULT(FALSE)'
@@ -396,8 +396,8 @@ BEGIN
',coin_pub BYTEA NOT NULL PRIMARY KEY CHECK (LENGTH(coin_pub)=32)'
',age_commitment_hash BYTEA CHECK (LENGTH(age_commitment_hash)=32)'
',denom_sig BYTEA NOT NULL'
- ',remaining_val INT8 NOT NULL'
- ',remaining_frac INT4 NOT NULL'
+ ',remaining_val INT8 NOT NULL DEFAULT(0)'
+ ',remaining_frac INT4 NOT NULL DEFAULT(0)'
') %s ;'
,table_name
,'PARTITION BY HASH (coin_pub)' -- FIXME: or include denominations_serial? or multi-level partitioning?;