Merge pull request #12 from 8thlight/bite-event

bite event transformer
This commit is contained in:
Takayuki Goto
2018-09-04 09:58:51 -05:00
committed by GitHub
21 changed files with 1080 additions and 0 deletions
@@ -0,0 +1 @@
DROP TABLE maker.bite;
@@ -0,0 +1,14 @@
CREATE TABLE maker.bite (
id SERIAL PRIMARY KEY,
header_id INTEGER NOT NULL REFERENCES headers (id) ON DELETE CASCADE,
ilk bytea,
lad bytea,
ink VARCHAR,
art VARCHAR,
iArt VARCHAR,
tab NUMERIC,
flip VARCHAR,
tx_idx INTEGER NOT NUll,
raw_log JSONB,
UNIQUE (header_id, tx_idx)
)
+70
View File
@@ -40,6 +40,45 @@ SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: bite; Type: TABLE; Schema: maker; Owner: -
--
CREATE TABLE maker.bite (
id integer NOT NULL,
header_id integer NOT NULL,
ilk bytea,
lad bytea,
ink character varying,
art character varying,
iart character varying,
tab numeric,
flip character varying,
tx_idx integer NOT NULL,
raw_log jsonb
);
--
-- Name: bite_id_seq; Type: SEQUENCE; Schema: maker; Owner: -
--
CREATE SEQUENCE maker.bite_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bite_id_seq; Type: SEQUENCE OWNED BY; Schema: maker; Owner: -
--
ALTER SEQUENCE maker.bite_id_seq OWNED BY maker.bite.id;
--
-- Name: flip_kick; Type: TABLE; Schema: maker; Owner: -
--
@@ -564,6 +603,13 @@ CREATE VIEW public.watched_event_logs AS
WHERE ((((log_filters.topic0)::text = (logs.topic0)::text) OR (log_filters.topic0 IS NULL)) AND (((log_filters.topic1)::text = (logs.topic1)::text) OR (log_filters.topic1 IS NULL)) AND (((log_filters.topic2)::text = (logs.topic2)::text) OR (log_filters.topic2 IS NULL)) AND (((log_filters.topic3)::text = (logs.topic3)::text) OR (log_filters.topic3 IS NULL)));
--
-- Name: bite id; Type: DEFAULT; Schema: maker; Owner: -
--
ALTER TABLE ONLY maker.bite ALTER COLUMN id SET DEFAULT nextval('maker.bite_id_seq'::regclass);
--
-- Name: flip_kick db_id; Type: DEFAULT; Schema: maker; Owner: -
--
@@ -655,6 +701,22 @@ ALTER TABLE ONLY public.transactions ALTER COLUMN id SET DEFAULT nextval('public
ALTER TABLE ONLY public.watched_contracts ALTER COLUMN contract_id SET DEFAULT nextval('public.watched_contracts_contract_id_seq'::regclass);
--
-- Name: bite bite_header_id_tx_idx_key; Type: CONSTRAINT; Schema: maker; Owner: -
--
ALTER TABLE ONLY maker.bite
ADD CONSTRAINT bite_header_id_tx_idx_key UNIQUE (header_id, tx_idx);
--
-- Name: bite bite_pkey; Type: CONSTRAINT; Schema: maker; Owner: -
--
ALTER TABLE ONLY maker.bite
ADD CONSTRAINT bite_pkey PRIMARY KEY (id);
--
-- Name: flip_kick flip_kick_id_key; Type: CONSTRAINT; Schema: maker; Owner: -
--
@@ -850,6 +912,14 @@ CREATE INDEX tx_from_index ON public.transactions USING btree (tx_from);
CREATE INDEX tx_to_index ON public.transactions USING btree (tx_to);
--
-- Name: bite bite_header_id_fkey; Type: FK CONSTRAINT; Schema: maker; Owner: -
--
ALTER TABLE ONLY maker.bite
ADD CONSTRAINT bite_header_id_fkey FOREIGN KEY (header_id) REFERENCES public.headers(id) ON DELETE CASCADE;
--
-- Name: flip_kick flip_kick_header_id_fkey; Type: FK CONSTRAINT; Schema: maker; Owner: -
--