From 35b40e6ff79e38286b67ea7e74759e8ea8d5ccec Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Fri, 18 Mar 2022 14:35:07 -0400 Subject: [PATCH 1/5] Add `known_gaps` table - DO NOT MERGE YET!! We will probably need to change the `modulus_block_number` columns name --- schema.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/schema.sql b/schema.sql index 7651c6c..23613f8 100644 --- a/schema.sql +++ b/schema.sql @@ -469,6 +469,18 @@ CREATE TABLE public.nodes ( ); +-- +-- Name: known_gaps; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE eth.known_gaps ( + starting_block_number bigint PRIMARY KEY, + ending_block_number bigint, + checked_out boolean, + modulus_block_number INT +); + + -- -- Name: TABLE nodes; Type: COMMENT; Schema: public; Owner: - -- From a1b75c31e99094ccd04a5f45c3eb8b2adbd2fd49 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Sat, 19 Mar 2022 09:17:48 -0400 Subject: [PATCH 2/5] Update schema.sql --- schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema.sql b/schema.sql index 23613f8..34b8cf0 100644 --- a/schema.sql +++ b/schema.sql @@ -477,7 +477,7 @@ CREATE TABLE eth.known_gaps ( starting_block_number bigint PRIMARY KEY, ending_block_number bigint, checked_out boolean, - modulus_block_number INT + processing_key INT ); From e99787242e5f2dd67bc9c37a81a6368ef41e8041 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Thu, 31 Mar 2022 10:45:11 -0400 Subject: [PATCH 3/5] Add Migration file --- db/migrations/00019_create_known_gaps_table.sql | 10 ++++++++++ schema.sql | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 db/migrations/00019_create_known_gaps_table.sql diff --git a/db/migrations/00019_create_known_gaps_table.sql b/db/migrations/00019_create_known_gaps_table.sql new file mode 100644 index 0000000..b6235b3 --- /dev/null +++ b/db/migrations/00019_create_known_gaps_table.sql @@ -0,0 +1,10 @@ +-- +goose Up +CREATE TABLE eth.known_gaps ( + starting_block_number bigint PRIMARY KEY, + ending_block_number bigint, + checked_out boolean, + processing_key bigint +); + +-- +goose Down +DROP TABLE eth.known_gaps; \ No newline at end of file diff --git a/schema.sql b/schema.sql index 34b8cf0..cc9a041 100644 --- a/schema.sql +++ b/schema.sql @@ -477,7 +477,7 @@ CREATE TABLE eth.known_gaps ( starting_block_number bigint PRIMARY KEY, ending_block_number bigint, checked_out boolean, - processing_key INT + processing_key bigint ); From b2f8f63a65107fb9da3df13a6829672b82a00202 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Thu, 31 Mar 2022 10:47:29 -0400 Subject: [PATCH 4/5] Update file name --- ...ate_known_gaps_table.sql => 00031_create_known_gaps_table.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename db/migrations/{00019_create_known_gaps_table.sql => 00031_create_known_gaps_table.sql} (100%) diff --git a/db/migrations/00019_create_known_gaps_table.sql b/db/migrations/00031_create_known_gaps_table.sql similarity index 100% rename from db/migrations/00019_create_known_gaps_table.sql rename to db/migrations/00031_create_known_gaps_table.sql From 2ffb98c6f7608cbc14f757dcbb924e4eda2fc91c Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Thu, 31 Mar 2022 12:06:11 -0400 Subject: [PATCH 5/5] Change file name --- ...ate_known_gaps_table.sql => 00021_create_known_gaps_table.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename db/migrations/{00031_create_known_gaps_table.sql => 00021_create_known_gaps_table.sql} (100%) diff --git a/db/migrations/00031_create_known_gaps_table.sql b/db/migrations/00021_create_known_gaps_table.sql similarity index 100% rename from db/migrations/00031_create_known_gaps_table.sql rename to db/migrations/00021_create_known_gaps_table.sql