Skip to content

Commit

Permalink
Merge pull request #2470 from gobitfly/BIDS-2340/FixPerformanceXdColumns
Browse files Browse the repository at this point in the history
(BIDS-2340) Fix performance xd columns (remove them from DB)
  • Loading branch information
recy21 authored Aug 16, 2023
2 parents 734d8c1 + 8cd8012 commit 7a7806c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions db/migrations/20230814224221_fix_performance_xd.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- +goose Up
-- +goose StatementBegin
SELECT 'delete all unneeded performance xd columns';
ALTER TABLE validator_performance DROP COLUMN IF EXISTS performance1d;
ALTER TABLE validator_performance DROP COLUMN IF EXISTS performance7d;
ALTER TABLE validator_performance DROP COLUMN IF EXISTS performance31d;
ALTER TABLE validator_performance DROP COLUMN IF EXISTS performance365d;
-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin
SELECT 'add all unneeded performance xd columns';
ALTER TABLE validator_stats ADD COLUMN IF NOT EXISTS performance1d BIGINT NOT NULL;
ALTER TABLE validator_stats ADD COLUMN IF NOT EXISTS performance7d BIGINT NOT NULL;
ALTER TABLE validator_stats ADD COLUMN IF NOT EXISTS performance31d BIGINT NOT NULL;
ALTER TABLE validator_stats ADD COLUMN IF NOT EXISTS performance365d BIGINT NOT NULL;
-- +goose StatementEnd

0 comments on commit 7a7806c

Please sign in to comment.