diff options
Diffstat (limited to 'src/exchangedb/exchange-0001-part.sql')
| -rw-r--r-- | src/exchangedb/exchange-0001-part.sql | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/exchangedb/exchange-0001-part.sql b/src/exchangedb/exchange-0001-part.sql index 7e2547db..4a116d12 100644 --- a/src/exchangedb/exchange-0001-part.sql +++ b/src/exchangedb/exchange-0001-part.sql @@ -561,7 +561,8 @@ CREATE TABLE IF NOT EXISTS policy_details ,serial_id BYTEA PRIMARY KEY CHECK(LENGTH(serial_id)=64) ,policy_options VARCHAR ,deadline INT8 NOT NULL - ,fulfilment_state INT4 NOT NULL CHECK(fulfilment_state between 0 and 3)) + ,timeout_fulfilment_state smallint NOT NULL CHECK(timeout_fulfilment_state in (5, 6)) + ,fulfilment_state smallint NOT NULL CHECK(fulfilment_state between 0 and 6)) PARTITION BY HASH (serial_id); COMMENT ON TABLE policy_details IS 'Policies that were provided with deposits via policy extensions.'; @@ -571,8 +572,17 @@ COMMENT ON COLUMN policy_details.policy_options IS 'JSON object with options set that the exchange needs to consider when executing a deposit. Supported details depend on the policy extensions supported by the exchange.'; COMMENT ON COLUMN policy_details.deadline IS 'Deadline until the policy must be marked as fulfilled or unfulfilled (maybe "forever")'; +COMMENT ON COLUMN policy_details.timeout_fulfilment_state + IS 'State that a pending policy should be put into, once the deadline is reached. Allowed values are 5 (TIMEOUT, transfer coins) or 6 (TIMEOUT, coins refreshable)'; COMMENT ON COLUMN policy_details.fulfilment_state - IS 'State of the fulfilment: 0 (PENDING), 1 (FULFILLED), 2 (NOT FULFILLED), 3 (TIMED OUT)'; + IS 'State of the fulfilment: + - 0 (PENDING) + - 1 (SUCCESS, transfer coins) + - 2 (SUCCESS, coins refreshable) + - 3 (FAILURE, transfer coins) + - 4 (FAILURE, coins refreshable) + - 5 (TIMEOUT, tranfer coins) + - 6 (TIMEOUT, coins refrehsable)'; CREATE TABLE IF NOT EXISTS policy_details_default PARTITION OF policy_details |
