Add log index to Dent

This commit is contained in:
Rob Mulholand
2018-10-22 12:14:43 -05:00
parent 1aafb7201e
commit e5ba0496a6
7 changed files with 15 additions and 8 deletions
@@ -6,7 +6,8 @@ CREATE TABLE maker.dent (
bid NUMERIC,
guy BYTEA,
tic NUMERIC,
tx_idx INTEGER NOT NUll,
log_idx INTEGER NOT NUll,
tx_idx INTEGER NOT NUll,
raw_log JSONB,
UNIQUE (header_id, tx_idx)
UNIQUE (header_id, tx_idx, log_idx)
);
+3 -2
View File
@@ -248,6 +248,7 @@ CREATE TABLE maker.dent (
bid numeric,
guy bytea,
tic numeric,
log_idx integer NOT NULL,
tx_idx integer NOT NULL,
raw_log jsonb
);
@@ -1789,11 +1790,11 @@ ALTER TABLE ONLY maker.deal
--
-- Name: dent dent_header_id_tx_idx_key; Type: CONSTRAINT; Schema: maker; Owner: -
-- Name: dent dent_header_id_tx_idx_log_idx_key; Type: CONSTRAINT; Schema: maker; Owner: -
--
ALTER TABLE ONLY maker.dent
ADD CONSTRAINT dent_header_id_tx_idx_key UNIQUE (header_id, tx_idx);
ADD CONSTRAINT dent_header_id_tx_idx_log_idx_key UNIQUE (header_id, tx_idx, log_idx);
--