Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(migrations): add no tx statement for concurrent migration #1197

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ ALTER TABLE users_val_dashboards_groups ADD COLUMN IF NOT EXISTS webhook_retries
-- +goose Down
-- +goose StatementBegin
SELECT 'remove columns from table users_val_dashboards_groups';
ALTER TABLE users_val_dashboards_groups DROP COLUMN IF NOT EXISTS webhook_last_sent;
ALTER TABLE users_val_dashboards_groups DROP COLUMN IF NOT EXISTS webhook_retries;
ALTER TABLE users_val_dashboards_groups DROP COLUMN IF EXISTS webhook_last_sent;
ALTER TABLE users_val_dashboards_groups DROP COLUMN IF EXISTS webhook_retries;
-- +goose StatementEnd
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
-- +goose NO TRANSACTION

-- +goose Up
-- +goose StatementBegin
SELECT 'creating idx_blocks_withdrawals_validatorindex_slot';
-- +goose StatementBegin
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_blocks_withdrawals_validatorindex_slot ON blocks_withdrawals (validatorindex, block_slot DESC);
-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin
SELECT 'dropping idx_blocks_withdrawals_validatorindex_slot';
-- +goose StatementBegin
DROP INDEX CONCURRENTLY IF EXISTS idx_blocks_withdrawals_validatorindex_slot;
-- +goose StatementEnd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS rocketpool_onchain_configs (
PRIMARY KEY (rocketpool_storage_address)
);

ALTER TABLE rocketpool_minipools ADD COLUMN validator_index INTEGER;
ALTER TABLE rocketpool_minipools ADD COLUMN IF NOT EXISTS validator_index INTEGER;
CREATE INDEX IF NOT EXISTS rocketpool_minipools_validator_index_idx ON rocketpool_minipools (validator_index);

-- +goose StatementEnd
Expand All @@ -18,6 +18,6 @@ CREATE INDEX IF NOT EXISTS rocketpool_minipools_validator_index_idx ON rocketpoo
DROP TABLE IF EXISTS rocketpool_onchain_configs;

DROP INDEX IF EXISTS rocketpool_minipools_validator_index_idx;
ALTER TABLE rocketpool_minipools DROP COLUMN validator_index;
ALTER TABLE rocketpool_minipools DROP COLUMN IF EXISTS validator_index;

-- +goose StatementEnd
Loading