aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/0002-policy_details.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/0002-policy_details.sql')
-rw-r--r--src/exchangedb/0002-policy_details.sql18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/exchangedb/0002-policy_details.sql b/src/exchangedb/0002-policy_details.sql
index cd3c2f10e..c9bfd1575 100644
--- a/src/exchangedb/0002-policy_details.sql
+++ b/src/exchangedb/0002-policy_details.sql
@@ -16,8 +16,8 @@
-- FIXME: this table should be sharded!
-CREATE TABLE IF NOT EXISTS policy_details
- (policy_details_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY
+CREATE TABLE policy_details
+ (policy_details_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE
,policy_hash_code BYTEA PRIMARY KEY CHECK(LENGTH(policy_hash_code)=16)
,policy_json VARCHAR
,deadline INT8 NOT NULL
@@ -57,17 +57,3 @@ COMMENT ON COLUMN policy_details.fulfillment_state
- 5 (Timeout)';
COMMENT ON COLUMN policy_details.fulfillment_id
IS 'Reference to the proof of the fulfillment of this policy, if it exists. Invariant: If not NULL, this entry''s .hash_code MUST be part of the corresponding policy_fulfillments.policy_hash_codes array.';
-
-
-INSERT INTO exchange_tables
- (name
- ,version
- ,action
- ,partitioned
- ,by_range)
- VALUES
- ('policy_details'
- ,'exchange-0002'
- ,'create'
- ,FALSE -- BAD! FIXME!
- ,FALSE);