From 974089fe1797a21b4085cb5b4ff42cedd27b35b8 Mon Sep 17 00:00:00 2001 From: Gui Iribarren Date: Tue, 23 Apr 2024 17:54:12 +0200 Subject: [PATCH] indexer: revert migration 10 changes and add dummy migration 11 Revert "indexer: don't drop start_block, end_block, block_count in migration 10" This reverts commit c97e244c98e66823f35fce36572d6e12e82a4523. --- vochain/indexer/migrations/0010_processes_manually_ended.sql | 4 ++++ vochain/indexer/migrations/0011_drop_deprecated_columns.sql | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 vochain/indexer/migrations/0011_drop_deprecated_columns.sql diff --git a/vochain/indexer/migrations/0010_processes_manually_ended.sql b/vochain/indexer/migrations/0010_processes_manually_ended.sql index 44c4b1987..595b36871 100644 --- a/vochain/indexer/migrations/0010_processes_manually_ended.sql +++ b/vochain/indexer/migrations/0010_processes_manually_ended.sql @@ -4,3 +4,7 @@ ADD COLUMN manually_ended BOOLEAN NOT NULL DEFAULT FALSE; UPDATE processes SET manually_ended = end_block < (start_block+block_count); + +ALTER TABLE processes DROP COLUMN start_block; +ALTER TABLE processes DROP COLUMN end_block; +ALTER TABLE processes DROP COLUMN block_count; diff --git a/vochain/indexer/migrations/0011_drop_deprecated_columns.sql b/vochain/indexer/migrations/0011_drop_deprecated_columns.sql new file mode 100644 index 000000000..a2ba21cb7 --- /dev/null +++ b/vochain/indexer/migrations/0011_drop_deprecated_columns.sql @@ -0,0 +1,5 @@ +-- +goose Up +-- intentionally does nothing, columns were already dropped in migration 10 + +-- This is a no-op command in SQLite, used just to have a valid SQL statement. +SELECT 1;