Add contracts table / start building out watch contracts

This commit is contained in:
Matt Krump
2017-11-09 15:06:01 -06:00
parent 84205a21ea
commit 30fadffb14
11 changed files with 129 additions and 6 deletions
+44
View File
@@ -72,6 +72,35 @@ CREATE SEQUENCE blocks_id_seq
ALTER SEQUENCE blocks_id_seq OWNED BY blocks.id;
--
-- Name: contracts; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE contracts (
contract_id integer NOT NULL,
contract_hash character varying(66)
);
--
-- Name: contracts_contract_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE contracts_contract_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: contracts_contract_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE contracts_contract_id_seq OWNED BY contracts.contract_id;
--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
--
@@ -124,6 +153,13 @@ ALTER SEQUENCE transactions_id_seq OWNED BY transactions.id;
ALTER TABLE ONLY blocks ALTER COLUMN id SET DEFAULT nextval('blocks_id_seq'::regclass);
--
-- Name: contracts contract_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY contracts ALTER COLUMN contract_id SET DEFAULT nextval('contracts_contract_id_seq'::regclass);
--
-- Name: transactions id; Type: DEFAULT; Schema: public; Owner: -
--
@@ -139,6 +175,14 @@ ALTER TABLE ONLY blocks
ADD CONSTRAINT blocks_pkey PRIMARY KEY (id);
--
-- Name: contracts contracts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY contracts
ADD CONSTRAINT contracts_pkey PRIMARY KEY (contract_id);
--
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--