General clean up #10

Merged
roysc merged 4 commits from roysc/further-cleanup into v5 2024-07-24 07:13:23 +00:00
Showing only changes of commit b16620bf4d - Show all commits

View File

@ -2,8 +2,8 @@
-- PostgreSQL database dump -- PostgreSQL database dump
-- --
-- Dumped from database version 14.8 -- Dumped from database version 14.12
-- Dumped by pg_dump version 14.8 (Ubuntu 14.8-0ubuntu0.22.04.1) -- Dumped by pg_dump version 14.12
SET statement_timeout = 0; SET statement_timeout = 0;
SET lock_timeout = 0; SET lock_timeout = 0;
@ -209,7 +209,8 @@ CREATE TABLE eth.header_cids (
bloom bytea NOT NULL, bloom bytea NOT NULL,
"timestamp" bigint NOT NULL, "timestamp" bigint NOT NULL,
coinbase character varying(66) NOT NULL, coinbase character varying(66) NOT NULL,
canonical boolean DEFAULT true NOT NULL canonical boolean DEFAULT true NOT NULL,
withdrawals_root character varying(66) NOT NULL
); );
@ -333,6 +334,21 @@ CREATE TABLE eth.uncle_cids (
); );
--
-- Name: withdrawal_cids; Type: TABLE; Schema: eth; Owner: -
--
CREATE TABLE eth.withdrawal_cids (
block_number bigint NOT NULL,
header_id character varying(66) NOT NULL,
cid text NOT NULL,
index integer NOT NULL,
validator integer NOT NULL,
address character varying(66) NOT NULL,
amount numeric NOT NULL
);
-- --
-- Name: watched_addresses; Type: TABLE; Schema: eth_meta; Owner: - -- Name: watched_addresses; Type: TABLE; Schema: eth_meta; Owner: -
-- --
@ -490,6 +506,14 @@ ALTER TABLE ONLY eth.uncle_cids
ADD CONSTRAINT uncle_cids_pkey PRIMARY KEY (block_hash, block_number); ADD CONSTRAINT uncle_cids_pkey PRIMARY KEY (block_hash, block_number);
--
-- Name: withdrawal_cids withdrawal_cids_pkey; Type: CONSTRAINT; Schema: eth; Owner: -
--
ALTER TABLE ONLY eth.withdrawal_cids
ADD CONSTRAINT withdrawal_cids_pkey PRIMARY KEY (index, header_id, block_number);
-- --
-- Name: watched_addresses watched_addresses_pkey; Type: CONSTRAINT; Schema: eth_meta; Owner: - -- Name: watched_addresses watched_addresses_pkey; Type: CONSTRAINT; Schema: eth_meta; Owner: -
-- --
@ -782,6 +806,13 @@ CREATE UNIQUE INDEX uncle_cid_block_number_index ON eth.uncle_cids USING btree (
CREATE INDEX uncle_header_id_index ON eth.uncle_cids USING btree (header_id); CREATE INDEX uncle_header_id_index ON eth.uncle_cids USING btree (header_id);
--
-- Name: withdrawal_cids_block_number_idx; Type: INDEX; Schema: eth; Owner: -
--
CREATE INDEX withdrawal_cids_block_number_idx ON eth.withdrawal_cids USING btree (block_number DESC);
-- --
-- Name: blocks_block_number_idx; Type: INDEX; Schema: ipld; Owner: - -- Name: blocks_block_number_idx; Type: INDEX; Schema: ipld; Owner: -
-- --
@ -793,49 +824,56 @@ CREATE INDEX blocks_block_number_idx ON ipld.blocks USING btree (block_number DE
-- Name: log_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: - -- Name: log_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: -
-- --
CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.log_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_internal.insert_blocker(); CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.log_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_functions.insert_blocker();
-- --
-- Name: receipt_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: - -- Name: receipt_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: -
-- --
CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.receipt_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_internal.insert_blocker(); CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.receipt_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_functions.insert_blocker();
-- --
-- Name: state_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: - -- Name: state_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: -
-- --
CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.state_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_internal.insert_blocker(); CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.state_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_functions.insert_blocker();
-- --
-- Name: storage_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: - -- Name: storage_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: -
-- --
CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.storage_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_internal.insert_blocker(); CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.storage_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_functions.insert_blocker();
-- --
-- Name: transaction_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: - -- Name: transaction_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: -
-- --
CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.transaction_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_internal.insert_blocker(); CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.transaction_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_functions.insert_blocker();
-- --
-- Name: uncle_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: - -- Name: uncle_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: -
-- --
CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.uncle_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_internal.insert_blocker(); CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.uncle_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_functions.insert_blocker();
--
-- Name: withdrawal_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: -
--
CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.withdrawal_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_functions.insert_blocker();
-- --
-- Name: blocks ts_insert_blocker; Type: TRIGGER; Schema: ipld; Owner: - -- Name: blocks ts_insert_blocker; Type: TRIGGER; Schema: ipld; Owner: -
-- --
CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON ipld.blocks FOR EACH ROW EXECUTE FUNCTION _timescaledb_internal.insert_blocker(); CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON ipld.blocks FOR EACH ROW EXECUTE FUNCTION _timescaledb_functions.insert_blocker();
-- --