From 60fec868819fd11c7b40f3a39f16845bebfeb6a8 Mon Sep 17 00:00:00 2001 From: Edvard Date: Fri, 26 Oct 2018 15:12:41 +0200 Subject: [PATCH] Squash drip_file checked_headers --- db/migrations/1536603967_create_drip_file.down.sql | 12 ++++++++++++ ...les.up.sql => 1536603967_create_drip_file.up.sql} | 11 ++++++++++- .../1536603967_create_drip_file_tables.down.sql | 3 --- ...8070524_add_drip_file_to_checked_headers.down.sql | 6 ------ ...538070524_add_drip_file_to_checked_headers.up.sql | 6 ------ 5 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 db/migrations/1536603967_create_drip_file.down.sql rename db/migrations/{1536603967_create_drip_file_tables.up.sql => 1536603967_create_drip_file.up.sql} (74%) delete mode 100644 db/migrations/1536603967_create_drip_file_tables.down.sql delete mode 100644 db/migrations/1538070524_add_drip_file_to_checked_headers.down.sql delete mode 100644 db/migrations/1538070524_add_drip_file_to_checked_headers.up.sql diff --git a/db/migrations/1536603967_create_drip_file.down.sql b/db/migrations/1536603967_create_drip_file.down.sql new file mode 100644 index 00000000..0ee02482 --- /dev/null +++ b/db/migrations/1536603967_create_drip_file.down.sql @@ -0,0 +1,12 @@ +DROP TABLE maker.drip_file_ilk; +DROP TABLE maker.drip_file_repo; +DROP TABLE maker.drip_file_vow; + +ALTER TABLE public.checked_headers + DROP COLUMN drip_file_ilk_checked; + +ALTER TABLE public.checked_headers + DROP COLUMN drip_file_repo_checked; + +ALTER TABLE public.checked_headers + DROP COLUMN drip_file_vow_checked; \ No newline at end of file diff --git a/db/migrations/1536603967_create_drip_file_tables.up.sql b/db/migrations/1536603967_create_drip_file.up.sql similarity index 74% rename from db/migrations/1536603967_create_drip_file_tables.up.sql rename to db/migrations/1536603967_create_drip_file.up.sql index e6da2764..0c657f0f 100644 --- a/db/migrations/1536603967_create_drip_file_tables.up.sql +++ b/db/migrations/1536603967_create_drip_file.up.sql @@ -30,4 +30,13 @@ CREATE TABLE maker.drip_file_vow ( tx_idx INTEGER NOT NULL, raw_log JSONB, UNIQUE (header_id, tx_idx, log_idx) -); \ No newline at end of file +); + +ALTER TABLE public.checked_headers + ADD COLUMN drip_file_ilk_checked BOOLEAN NOT NULL DEFAULT FALSE; + +ALTER TABLE public.checked_headers + ADD COLUMN drip_file_repo_checked BOOLEAN NOT NULL DEFAULT FALSE; + +ALTER TABLE public.checked_headers + ADD COLUMN drip_file_vow_checked BOOLEAN NOT NULL DEFAULT FALSE; \ No newline at end of file diff --git a/db/migrations/1536603967_create_drip_file_tables.down.sql b/db/migrations/1536603967_create_drip_file_tables.down.sql deleted file mode 100644 index 6b2c745b..00000000 --- a/db/migrations/1536603967_create_drip_file_tables.down.sql +++ /dev/null @@ -1,3 +0,0 @@ -DROP TABLE maker.drip_file_ilk; -DROP TABLE maker.drip_file_repo; -DROP TABLE maker.drip_file_vow; \ No newline at end of file diff --git a/db/migrations/1538070524_add_drip_file_to_checked_headers.down.sql b/db/migrations/1538070524_add_drip_file_to_checked_headers.down.sql deleted file mode 100644 index 8f8de9f9..00000000 --- a/db/migrations/1538070524_add_drip_file_to_checked_headers.down.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE public.checked_headers - DROP COLUMN drip_file_ilk_checked; -ALTER TABLE public.checked_headers - DROP COLUMN drip_file_repo_checked; -ALTER TABLE public.checked_headers - DROP COLUMN drip_file_vow_checked; \ No newline at end of file diff --git a/db/migrations/1538070524_add_drip_file_to_checked_headers.up.sql b/db/migrations/1538070524_add_drip_file_to_checked_headers.up.sql deleted file mode 100644 index 1f2c454e..00000000 --- a/db/migrations/1538070524_add_drip_file_to_checked_headers.up.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE public.checked_headers - ADD COLUMN drip_file_ilk_checked BOOLEAN NOT NULL DEFAULT FALSE; -ALTER TABLE public.checked_headers - ADD COLUMN drip_file_repo_checked BOOLEAN NOT NULL DEFAULT FALSE; -ALTER TABLE public.checked_headers - ADD COLUMN drip_file_vow_checked BOOLEAN NOT NULL DEFAULT FALSE; \ No newline at end of file