Start storing transactions

This commit is contained in:
Matt Krump
2017-10-31 09:18:30 -05:00
committed by Eric Meyer
parent 5c0e39eb9f
commit 688bcd30f2
11 changed files with 261 additions and 61 deletions
@@ -0,0 +1 @@
DROP TABLE transactions
@@ -0,0 +1,10 @@
CREATE TABLE transactions
(
id SERIAL PRIMARY KEY,
tx_hash VARCHAR(66),
tx_nonce NUMERIC,
tx_to varchar(66),
tx_gaslimit NUMERIC,
tx_gasprice NUMERIC,
tx_value NUMERIC
)
+49
View File
@@ -76,6 +76,40 @@ CREATE TABLE schema_migrations (
);
--
-- Name: transactions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE transactions (
id integer NOT NULL,
tx_hash character varying(66),
tx_nonce numeric,
tx_to character varying(66),
tx_gaslimit numeric,
tx_gasprice numeric,
tx_value numeric
);
--
-- Name: transactions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE transactions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: transactions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE transactions_id_seq OWNED BY transactions.id;
--
-- Name: blocks id; Type: DEFAULT; Schema: public; Owner: -
--
@@ -83,6 +117,13 @@ CREATE TABLE schema_migrations (
ALTER TABLE ONLY blocks ALTER COLUMN id SET DEFAULT nextval('blocks_id_seq'::regclass);
--
-- Name: transactions id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY transactions ALTER COLUMN id SET DEFAULT nextval('transactions_id_seq'::regclass);
--
-- Name: blocks blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@@ -99,6 +140,14 @@ ALTER TABLE ONLY schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
--
-- Name: transactions transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY transactions
ADD CONSTRAINT transactions_pkey PRIMARY KEY (id);
--
-- PostgreSQL database dump complete
--