From e05942ec170fe06365cc7de5c54438585116a8b5 Mon Sep 17 00:00:00 2001 From: prathamesh0 Date: Thu, 13 Jan 2022 18:52:26 +0530 Subject: [PATCH] Add table for watched addresses in eth schema --- .../00017_create_watched_addresses_table.sql | 8 ++++++++ schema.sql | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 db/migrations/00017_create_watched_addresses_table.sql diff --git a/db/migrations/00017_create_watched_addresses_table.sql b/db/migrations/00017_create_watched_addresses_table.sql new file mode 100644 index 0000000..dbf4849 --- /dev/null +++ b/db/migrations/00017_create_watched_addresses_table.sql @@ -0,0 +1,8 @@ +-- +goose Up +CREATE TABLE eth.watched_addresses ( + address VARCHAR(66) PRIMARY KEY, + added_at BIGINT NOT NULL +); + +-- +goose Down +DROP TABLE eth.watched_addresses; diff --git a/schema.sql b/schema.sql index d23164d..12a77da 100644 --- a/schema.sql +++ b/schema.sql @@ -552,6 +552,16 @@ CREATE SEQUENCE eth.uncle_cids_id_seq ALTER SEQUENCE eth.uncle_cids_id_seq OWNED BY eth.uncle_cids.id; +-- +-- Name: watched_addresses; Type: TABLE; Schema: eth; Owner: - +-- + +CREATE TABLE eth.watched_addresses ( + address character varying(66) NOT NULL, + added_at bigint NOT NULL +); + + -- -- Name: blocks; Type: TABLE; Schema: public; Owner: - -- @@ -863,6 +873,14 @@ ALTER TABLE ONLY eth.uncle_cids ADD CONSTRAINT uncle_cids_pkey PRIMARY KEY (id); +-- +-- Name: watched_addresses watched_addresses_pkey; Type: CONSTRAINT; Schema: eth; Owner: - +-- + +ALTER TABLE ONLY eth.watched_addresses + ADD CONSTRAINT watched_addresses_pkey PRIMARY KEY (address); + + -- -- Name: blocks blocks_key_key; Type: CONSTRAINT; Schema: public; Owner: - --