From 85bc243896907fd92741b02b0d602196a6cc1f99 Mon Sep 17 00:00:00 2001 From: i-norden Date: Wed, 8 Feb 2023 18:13:15 -0600 Subject: [PATCH] drop tx_data and log_data; data can still be accessed in referenced ipld blocks in public.blocks --- db/migrations/00006_create_eth_transaction_cids_table.sql | 1 - db/migrations/00011_create_eth_log_cids_table.sql | 1 - db/migrations/00014_create_cid_indexes.sql | 4 ---- 3 files changed, 6 deletions(-) diff --git a/db/migrations/00006_create_eth_transaction_cids_table.sql b/db/migrations/00006_create_eth_transaction_cids_table.sql index e4c14d6..6bcd2dd 100644 --- a/db/migrations/00006_create_eth_transaction_cids_table.sql +++ b/db/migrations/00006_create_eth_transaction_cids_table.sql @@ -8,7 +8,6 @@ CREATE TABLE IF NOT EXISTS eth.transaction_cids ( src VARCHAR(66) NOT NULL, index INTEGER NOT NULL, mh_key TEXT NOT NULL, - tx_data BYTEA, tx_type INTEGER, value NUMERIC, PRIMARY KEY (tx_hash, header_id, block_number) diff --git a/db/migrations/00011_create_eth_log_cids_table.sql b/db/migrations/00011_create_eth_log_cids_table.sql index fae2869..4c27b27 100644 --- a/db/migrations/00011_create_eth_log_cids_table.sql +++ b/db/migrations/00011_create_eth_log_cids_table.sql @@ -11,7 +11,6 @@ CREATE TABLE IF NOT EXISTS eth.log_cids ( topic1 VARCHAR(66), topic2 VARCHAR(66), topic3 VARCHAR(66), - log_data BYTEA, PRIMARY KEY (rct_id, index, header_id, block_number) ); diff --git a/db/migrations/00014_create_cid_indexes.sql b/db/migrations/00014_create_cid_indexes.sql index 02615f6..a9b747b 100644 --- a/db/migrations/00014_create_cid_indexes.sql +++ b/db/migrations/00014_create_cid_indexes.sql @@ -18,7 +18,6 @@ CREATE INDEX tx_cid_index ON eth.transaction_cids USING btree (cid, block_number CREATE INDEX tx_mh_block_number_index ON eth.transaction_cids USING btree (mh_key, block_number); CREATE INDEX tx_dst_index ON eth.transaction_cids USING btree (dst); CREATE INDEX tx_src_index ON eth.transaction_cids USING btree (src); -CREATE INDEX tx_data_index ON eth.transaction_cids USING btree (tx_data); -- receipt indexes CREATE INDEX rct_block_number_index ON eth.receipt_cids USING brin (block_number); @@ -63,11 +62,9 @@ CREATE INDEX log_topic0_index ON eth.log_cids USING btree (topic0); CREATE INDEX log_topic1_index ON eth.log_cids USING btree (topic1); CREATE INDEX log_topic2_index ON eth.log_cids USING btree (topic2); CREATE INDEX log_topic3_index ON eth.log_cids USING btree (topic3); -CREATE INDEX log_data_index ON eth.log_cids USING btree (log_data); -- +goose Down -- log indexes -DROP INDEX eth.log_data_index; DROP INDEX eth.log_topic3_index; DROP INDEX eth.log_topic2_index; DROP INDEX eth.log_topic1_index; @@ -113,7 +110,6 @@ DROP INDEX eth.rct_header_id_index; DROP INDEX eth.rct_block_number_index; -- transaction indexes -DROP INDEX eth.tx_data_index; DROP INDEX eth.tx_src_index; DROP INDEX eth.tx_dst_index; DROP INDEX eth.tx_mh_block_number_index;