commit 2c0c7f49604ae8d5e43cd98c74cb98e6a4f0a9f5
parent 0fd1c7e4c8e048ea2e2db666ce66d32cb41297e7
Author: MS <ms@taler.net>
Date: Wed, 1 Nov 2023 16:25:38 +0100
initiated payments table
setting a constraint on the length of request_uid column.
That's motivated by its use as the MsgId value in the corresponding
pain.001 document.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/database-versioning/libeufin-nexus-0001.sql b/database-versioning/libeufin-nexus-0001.sql
@@ -61,7 +61,7 @@ CREATE TABLE IF NOT EXISTS initiated_outgoing_transactions
,outgoing_transaction_id INT8 REFERENCES outgoing_transactions (outgoing_transaction_id)
,submitted BOOL DEFAULT FALSE
,hidden BOOL DEFAULT FALSE -- FIXME: explain this.
- ,request_uid TEXT NOT NULL UNIQUE
+ ,request_uid TEXT NOT NULL UNIQUE CHECK (char_length(request_uid) <= 35)
,failure_message TEXT -- NOTE: that may mix soon failures (those found at initiation time), or late failures (those found out along a fetch operation)
);
@@ -71,7 +71,8 @@ COMMENT ON COLUMN initiated_outgoing_transactions.request_uid
IS 'Unique identifier of this outgoing transaction initiation.
This value could come both from a nexus-httpd client or directly
generated when nexus-fetch bounces one payment. In both cases, this
-value will be used as a unique identifier for its related pain.001 document.';
+value will be used as a unique identifier for its related pain.001 document.
+For this reason, it must have at most 35 characters';
-- only active in exchange mode.
CREATE TABLE IF NOT EXISTS bounced_transactions