diff --git a/db/migrations/00013_create_cid_indexes.sql b/db/migrations/00013_create_cid_indexes.sql index 58ab67e5..5fd41617 100644 --- a/db/migrations/00013_create_cid_indexes.sql +++ b/db/migrations/00013_create_cid_indexes.sql @@ -91,8 +91,8 @@ DROP INDEX eth.state_header_id_index; -- receipt indexes DROP INDEX eth.rct_contract_hash_index; DROP INDEX eth.rct_contract_index; -DROP INDEX eth.rct_mh_index; -DROP INDEX eth.rct_cid_index; +DROP INDEX eth.rct_leaf_mh_index; +DROP INDEX eth.rct_leaf_cid_index; DROP INDEX eth.rct_tx_id_index; -- transaction indexes diff --git a/db/schema.sql b/db/schema.sql index 05a4283d..bb9906f0 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -248,8 +248,8 @@ ALTER SEQUENCE eth.header_cids_id_seq OWNED BY eth.header_cids.id; CREATE TABLE eth.receipt_cids ( id integer NOT NULL, tx_id integer NOT NULL, - cid text NOT NULL, - mh_key text NOT NULL, + leaf_cid text NOT NULL, + leaf_mh_key text NOT NULL, contract character varying(66), contract_hash character varying(66), topic0s character varying(66)[], @@ -798,10 +798,10 @@ CREATE INDEX header_mh_index ON eth.header_cids USING btree (mh_key); -- --- Name: rct_cid_index; Type: INDEX; Schema: eth; Owner: - +-- Name: rct_leaf_cid_index; Type: INDEX; Schema: eth; Owner: - -- -CREATE INDEX rct_cid_index ON eth.receipt_cids USING btree (cid); +CREATE INDEX rct_leaf_cid_index ON eth.receipt_cids USING btree (leaf_cid); -- @@ -826,10 +826,10 @@ CREATE INDEX rct_log_contract_index ON eth.receipt_cids USING gin (log_contracts -- --- Name: rct_mh_index; Type: INDEX; Schema: eth; Owner: - +-- Name: rct_leaf_mh_index; Type: INDEX; Schema: eth; Owner: - -- -CREATE INDEX rct_mh_index ON eth.receipt_cids USING btree (mh_key); +CREATE INDEX rct_leaf_mh_index ON eth.receipt_cids USING btree (leaf_mh_key); -- @@ -1066,11 +1066,11 @@ ALTER TABLE ONLY eth.header_cids -- --- Name: receipt_cids receipt_cids_mh_key_fkey; Type: FK CONSTRAINT; Schema: eth; Owner: - +-- Name: receipt_cids receipt_leaf_cids_mh_key_fkey; Type: FK CONSTRAINT; Schema: eth; Owner: - -- ALTER TABLE ONLY eth.receipt_cids - ADD CONSTRAINT receipt_cids_mh_key_fkey FOREIGN KEY (mh_key) REFERENCES public.blocks(key) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT receipt_leaf_cids_mh_key_fkey FOREIGN KEY (leaf_mh_key) REFERENCES public.blocks(key) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; -- diff --git a/docker-compose.yml b/docker-compose.yml index f6e190b2..28a62930 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,7 +20,7 @@ services: restart: on-failure depends_on: - db - image: vulcanize/statediff-migrations:latest + image: vulcanize/statediff-migrations:v0.6.0 environment: DATABASE_USER: vdbm DATABASE_NAME: vulcanize_public