forked from cerc-io/ipld-eth-server
Add Pip price feed
This commit is contained in:
@@ -0,0 +1 @@
|
||||
DROP TABLE maker.pips;
|
||||
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE maker.pips (
|
||||
id SERIAL PRIMARY KEY,
|
||||
block_number BIGINT NOT NULL,
|
||||
header_id INTEGER NOT NULL,
|
||||
usd_value NUMERIC,
|
||||
CONSTRAINT headers_fk FOREIGN KEY (header_id)
|
||||
REFERENCES headers (id)
|
||||
ON DELETE CASCADE
|
||||
);
|
||||
@@ -151,6 +151,38 @@ CREATE SEQUENCE maker.peps_id_seq
|
||||
ALTER SEQUENCE maker.peps_id_seq OWNED BY maker.peps.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: pips; Type: TABLE; Schema: maker; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE maker.pips (
|
||||
id integer NOT NULL,
|
||||
block_number bigint NOT NULL,
|
||||
header_id integer NOT NULL,
|
||||
usd_value numeric
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: pips_id_seq; Type: SEQUENCE; Schema: maker; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE maker.pips_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: pips_id_seq; Type: SEQUENCE OWNED BY; Schema: maker; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE maker.pips_id_seq OWNED BY maker.pips.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: logs; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@@ -544,6 +576,13 @@ ALTER TABLE ONLY maker.frob ALTER COLUMN id SET DEFAULT nextval('maker.frob_id_s
|
||||
ALTER TABLE ONLY maker.peps ALTER COLUMN id SET DEFAULT nextval('maker.peps_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: pips id; Type: DEFAULT; Schema: maker; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY maker.pips ALTER COLUMN id SET DEFAULT nextval('maker.pips_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: blocks id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
@@ -647,6 +686,14 @@ ALTER TABLE ONLY maker.peps
|
||||
ADD CONSTRAINT peps_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: pips pips_pkey; Type: CONSTRAINT; Schema: maker; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY maker.pips
|
||||
ADD CONSTRAINT pips_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: blocks blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@@ -802,6 +849,14 @@ ALTER TABLE ONLY maker.peps
|
||||
ADD CONSTRAINT headers_fk FOREIGN KEY (header_id) REFERENCES public.headers(id) ON DELETE CASCADE;
|
||||
|
||||
|
||||
--
|
||||
-- Name: pips headers_fk; Type: FK CONSTRAINT; Schema: maker; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY maker.pips
|
||||
ADD CONSTRAINT headers_fk FOREIGN KEY (header_id) REFERENCES public.headers(id) ON DELETE CASCADE;
|
||||
|
||||
|
||||
--
|
||||
-- Name: transactions blocks_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user