Merge pull request #69 from 8thlight/watch_contract

* Add contracts table / start building out watch contracts
This commit is contained in:
Matt K
2017-11-13 10:55:55 -06:00
committed by GitHub
11 changed files with 130 additions and 7 deletions
@@ -0,0 +1 @@
DROP TABLE watched_contracts
@@ -0,0 +1,5 @@
CREATE TABLE watched_contracts
(
contract_id SERIAL PRIMARY KEY,
contract_hash VARCHAR(66)
)
+45 -1
View File
@@ -3,7 +3,7 @@
--
-- Dumped from database version 10.0
-- Dumped by pg_dump version 10.0
-- Dumped by pg_dump version 10.1
SET statement_timeout = 0;
SET lock_timeout = 0;
@@ -118,6 +118,35 @@ CREATE SEQUENCE transactions_id_seq
ALTER SEQUENCE transactions_id_seq OWNED BY transactions.id;
--
-- Name: watched_contracts; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE watched_contracts (
contract_id integer NOT NULL,
contract_hash character varying(66)
);
--
-- Name: watched_contracts_contract_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE watched_contracts_contract_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: watched_contracts_contract_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE watched_contracts_contract_id_seq OWNED BY watched_contracts.contract_id;
--
-- Name: blocks id; Type: DEFAULT; Schema: public; Owner: -
--
@@ -132,6 +161,13 @@ ALTER TABLE ONLY blocks ALTER COLUMN id SET DEFAULT nextval('blocks_id_seq'::reg
ALTER TABLE ONLY transactions ALTER COLUMN id SET DEFAULT nextval('transactions_id_seq'::regclass);
--
-- Name: watched_contracts contract_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY watched_contracts ALTER COLUMN contract_id SET DEFAULT nextval('watched_contracts_contract_id_seq'::regclass);
--
-- Name: blocks blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@@ -156,6 +192,14 @@ ALTER TABLE ONLY transactions
ADD CONSTRAINT transactions_pkey PRIMARY KEY (id);
--
-- Name: watched_contracts watched_contracts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY watched_contracts
ADD CONSTRAINT watched_contracts_pkey PRIMARY KEY (contract_id);
--
-- Name: block_number_index; Type: INDEX; Schema: public; Owner: -
--