-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
-- Create table to track blockchain messages | ||
CREATE TABLE blockchain_messages( | ||
block_number BIGINT NOT NULL, | ||
block_hash BYTEA NOT NULL, | ||
originator_node_id INT NOT NULL, | ||
originator_sequence_id BIGINT NOT NULL, | ||
is_canonical BOOLEAN NOT NULL DEFAULT TRUE, | ||
PRIMARY KEY (block_number, block_hash), | ||
PRIMARY KEY (block_number, block_hash, originator_node_id, originator_sequence_id), | ||
FOREIGN KEY (originator_node_id, originator_sequence_id) REFERENCES gateway_envelopes(originator_node_id, originator_sequence_id) | ||
); | ||
|
||
CREATE INDEX idx_blockchain_messages_canonical ON blockchain_messages(block_number DESC, block_hash) | ||
WHERE | ||
is_canonical = TRUE; | ||
CREATE INDEX idx_blockchain_messages_block_canonical ON blockchain_messages(block_number, is_canonical); | ||
|
||
-- TODO: Check for better indexes |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.