Merge pull request #56 from vulcanize/schema-update
Update schema to remove uncles
This commit is contained in:
commit
b403e731be
@ -2,8 +2,8 @@
|
|||||||
-- PostgreSQL database dump
|
-- PostgreSQL database dump
|
||||||
--
|
--
|
||||||
|
|
||||||
-- Dumped from database version 10.5
|
-- Dumped from database version 10.6
|
||||||
-- Dumped by pg_dump version 10.4
|
-- Dumped by pg_dump version 10.6
|
||||||
|
|
||||||
SET statement_timeout = 0;
|
SET statement_timeout = 0;
|
||||||
SET lock_timeout = 0;
|
SET lock_timeout = 0;
|
||||||
@ -523,43 +523,6 @@ CREATE SEQUENCE public.uncles_id_seq
|
|||||||
ALTER SEQUENCE public.uncles_id_seq OWNED BY public.uncles.id;
|
ALTER SEQUENCE public.uncles_id_seq OWNED BY public.uncles.id;
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: uncles; Type: TABLE; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE TABLE public.uncles (
|
|
||||||
id integer NOT NULL,
|
|
||||||
hash character varying(66) NOT NULL,
|
|
||||||
block_id integer NOT NULL,
|
|
||||||
reward numeric NOT NULL,
|
|
||||||
miner character varying(42) NOT NULL,
|
|
||||||
raw jsonb,
|
|
||||||
block_timestamp numeric,
|
|
||||||
eth_node_id integer NOT NULL,
|
|
||||||
eth_node_fingerprint character varying(128)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: uncles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE SEQUENCE public.uncles_id_seq
|
|
||||||
AS integer
|
|
||||||
START WITH 1
|
|
||||||
INCREMENT BY 1
|
|
||||||
NO MINVALUE
|
|
||||||
NO MAXVALUE
|
|
||||||
CACHE 1;
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: uncles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER SEQUENCE public.uncles_id_seq OWNED BY public.uncles.id;
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: watched_contracts; Type: TABLE; Schema: public; Owner: -
|
-- Name: watched_contracts; Type: TABLE; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
@ -705,13 +668,6 @@ ALTER TABLE ONLY public.queued_storage ALTER COLUMN id SET DEFAULT nextval('publ
|
|||||||
ALTER TABLE ONLY public.uncles ALTER COLUMN id SET DEFAULT nextval('public.uncles_id_seq'::regclass);
|
ALTER TABLE ONLY public.uncles ALTER COLUMN id SET DEFAULT nextval('public.uncles_id_seq'::regclass);
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: uncles id; Type: DEFAULT; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER TABLE ONLY public.uncles ALTER COLUMN id SET DEFAULT nextval('public.uncles_id_seq'::regclass);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: watched_contracts contract_id; Type: DEFAULT; Schema: public; Owner: -
|
-- Name: watched_contracts contract_id; Type: DEFAULT; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
@ -871,22 +827,6 @@ ALTER TABLE ONLY public.uncles
|
|||||||
ADD CONSTRAINT uncles_pkey PRIMARY KEY (id);
|
ADD CONSTRAINT uncles_pkey PRIMARY KEY (id);
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: uncles uncles_block_id_hash_key; Type: CONSTRAINT; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER TABLE ONLY public.uncles
|
|
||||||
ADD CONSTRAINT uncles_block_id_hash_key UNIQUE (block_id, hash);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: uncles uncles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER TABLE ONLY public.uncles
|
|
||||||
ADD CONSTRAINT uncles_pkey PRIMARY KEY (id);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: watched_contracts watched_contracts_contract_hash_key; Type: CONSTRAINT; Schema: public; Owner: -
|
-- Name: watched_contracts watched_contracts_contract_hash_key; Type: CONSTRAINT; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
@ -1033,22 +973,6 @@ ALTER TABLE ONLY public.uncles
|
|||||||
ADD CONSTRAINT uncles_eth_node_id_fkey FOREIGN KEY (eth_node_id) REFERENCES public.eth_nodes(id) ON DELETE CASCADE;
|
ADD CONSTRAINT uncles_eth_node_id_fkey FOREIGN KEY (eth_node_id) REFERENCES public.eth_nodes(id) ON DELETE CASCADE;
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: uncles uncles_block_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER TABLE ONLY public.uncles
|
|
||||||
ADD CONSTRAINT uncles_block_id_fkey FOREIGN KEY (block_id) REFERENCES public.blocks(id) ON DELETE CASCADE;
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: uncles uncles_eth_node_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER TABLE ONLY public.uncles
|
|
||||||
ADD CONSTRAINT uncles_eth_node_id_fkey FOREIGN KEY (eth_node_id) REFERENCES public.eth_nodes(id) ON DELETE CASCADE;
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- PostgreSQL database dump complete
|
-- PostgreSQL database dump complete
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user