diff --git a/db/migrations/00007_create_eth_receipt_cids_table.sql b/db/migrations/00007_create_eth_receipt_cids_table.sql index 3bc6f16..f8b3788 100644 --- a/db/migrations/00007_create_eth_receipt_cids_table.sql +++ b/db/migrations/00007_create_eth_receipt_cids_table.sql @@ -5,7 +5,6 @@ CREATE TABLE IF NOT EXISTS eth.receipt_cids ( tx_id VARCHAR(66) NOT NULL, cid TEXT NOT NULL, contract VARCHAR(66), - contract_hash VARCHAR(66), post_state VARCHAR(66), post_status SMALLINT, PRIMARY KEY (tx_id, header_id, block_number) diff --git a/db/migrations/00008_create_eth_state_cids_table.sql b/db/migrations/00008_create_eth_state_cids_table.sql index 98801b7..0e4fbd8 100644 --- a/db/migrations/00008_create_eth_state_cids_table.sql +++ b/db/migrations/00008_create_eth_state_cids_table.sql @@ -4,7 +4,6 @@ CREATE TABLE IF NOT EXISTS eth.state_cids ( header_id VARCHAR(66) NOT NULL, state_leaf_key VARCHAR(66) NOT NULL, cid TEXT NOT NULL, - partial_path BYTEA NOT NULL, diff BOOLEAN NOT NULL DEFAULT FALSE, balance NUMERIC, -- NULL if "removed" nonce BIGINT, -- NULL if "removed" diff --git a/db/migrations/00009_create_eth_storage_cids_table.sql b/db/migrations/00009_create_eth_storage_cids_table.sql index d02c591..26430d0 100644 --- a/db/migrations/00009_create_eth_storage_cids_table.sql +++ b/db/migrations/00009_create_eth_storage_cids_table.sql @@ -5,7 +5,6 @@ CREATE TABLE IF NOT EXISTS eth.storage_cids ( state_leaf_key VARCHAR(66) NOT NULL, storage_leaf_key VARCHAR(66) NOT NULL, cid TEXT NOT NULL, - partial_path BYTEA NOT NULL, diff BOOLEAN NOT NULL DEFAULT FALSE, val BYTEA, -- NULL if "removed" removed BOOLEAN NOT NULL, diff --git a/db/migrations/00014_create_cid_indexes.sql b/db/migrations/00013_create_cid_indexes.sql similarity index 93% rename from db/migrations/00014_create_cid_indexes.sql rename to db/migrations/00013_create_cid_indexes.sql index 9b8a804..6f005aa 100644 --- a/db/migrations/00014_create_cid_indexes.sql +++ b/db/migrations/00013_create_cid_indexes.sql @@ -22,13 +22,11 @@ CREATE INDEX rct_block_number_index ON eth.receipt_cids USING brin (block_number CREATE INDEX rct_header_id_index ON eth.receipt_cids USING btree (header_id); CREATE INDEX rct_cid_block_number_index ON eth.receipt_cids USING btree (cid, block_number); CREATE INDEX rct_contract_index ON eth.receipt_cids USING btree (contract); -CREATE INDEX rct_contract_hash_index ON eth.receipt_cids USING btree (contract_hash); -- state node indexes CREATE INDEX state_block_number_index ON eth.state_cids USING brin (block_number); CREATE INDEX state_cid_block_number_index ON eth.state_cids USING btree (cid, block_number); CREATE INDEX state_header_id_index ON eth.state_cids USING btree (header_id); -CREATE INDEX state_partial_path_index ON eth.state_cids USING btree (partial_path); CREATE INDEX state_removed_index ON eth.state_cids USING btree (removed); CREATE INDEX state_code_hash_index ON eth.state_cids USING btree (code_hash); -- could be useful for e.g. selecting all the state accounts with the same contract bytecode deployed CREATE INDEX state_leaf_key_block_number_index ON eth.state_cids(state_leaf_key, block_number DESC); @@ -38,7 +36,6 @@ CREATE INDEX storage_block_number_index ON eth.storage_cids USING brin (block_nu CREATE INDEX storage_state_leaf_key_index ON eth.storage_cids USING btree (state_leaf_key); CREATE INDEX storage_cid_block_number_index ON eth.storage_cids USING btree (cid, block_number); CREATE INDEX storage_header_id_index ON eth.storage_cids USING btree (header_id); -CREATE INDEX storage_partial_path_index ON eth.storage_cids USING btree (partial_path); CREATE INDEX storage_removed_index ON eth.storage_cids USING btree (removed); CREATE INDEX storage_leaf_key_block_number_index ON eth.storage_cids(storage_leaf_key, block_number DESC); @@ -75,7 +72,6 @@ DROP INDEX eth.access_list_block_number_index; -- storage node indexes DROP INDEX eth.storage_removed_index; -DROP INDEX eth.storage_partial_path_index; DROP INDEX eth.storage_header_id_index; DROP INDEX eth.storage_cid_block_number_index; DROP INDEX eth.storage_leaf_key_index; @@ -86,14 +82,12 @@ DROP INDEX eth.storage_leaf_key_block_number_index; -- state node indexes DROP INDEX eth.state_code_hash_index; DROP INDEX eth.state_removed_index; -DROP INDEX eth.state_partial_path_index; DROP INDEX eth.state_header_id_index; DROP INDEX eth.state_cid_block_number_index; DROP INDEX eth.state_block_number_index; DROP INDEX eth.state_leaf_key_block_number_index; -- receipt indexes -DROP INDEX eth.rct_contract_hash_index; DROP INDEX eth.rct_contract_index; DROP INDEX eth.rct_cid_block_number_index; DROP INDEX eth.rct_header_id_index;