diff --git a/db/migrations/20230814224221_fix_performance_xd.sql b/db/migrations/20230814224221_fix_performance_xd.sql new file mode 100644 index 0000000000..4a4e1c5d38 --- /dev/null +++ b/db/migrations/20230814224221_fix_performance_xd.sql @@ -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 \ No newline at end of file