-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(db): update db-migration-files (#2996)
Co-authored-by: Patrick Pfeiffer <[email protected]>
- Loading branch information
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
db/migrations/20241121094954_rocketpool_onchain_configs.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
|
||
CREATE TABLE IF NOT EXISTS rocketpool_onchain_configs ( | ||
rocketpool_storage_address bytea NOT NULL, | ||
smoothing_pool_address bytea NOT NULL, | ||
PRIMARY KEY (rocketpool_storage_address) | ||
); | ||
|
||
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 | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
|
||
DROP TABLE IF EXISTS rocketpool_onchain_configs; | ||
|
||
DROP INDEX IF EXISTS rocketpool_minipools_validator_index_idx; | ||
ALTER TABLE rocketpool_minipools DROP COLUMN IF EXISTS validator_index; | ||
|
||
-- +goose StatementEnd |
21 changes: 21 additions & 0 deletions
21
db/migrations/20250109144744_add_finalized_execution_rewards_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
CREATE TABLE execution_rewards_finalized ( | ||
epoch int4 NOT NULL, | ||
slot int4 NOT NULL, | ||
proposer int4 NOT NULL, | ||
value numeric NOT NULL, | ||
CONSTRAINT finalized_execution_rewards_pk PRIMARY KEY (slot) | ||
); | ||
-- +goose StatementEnd | ||
-- +goose StatementBegin | ||
CREATE INDEX finalized_execution_rewards_epoch_idx ON execution_rewards_finalized USING btree (epoch); | ||
-- +goose StatementEnd | ||
-- +goose StatementBegin | ||
CREATE UNIQUE INDEX finalized_execution_rewards_proposer_idx ON execution_rewards_finalized USING btree (proposer, slot); | ||
-- +goose StatementEnd | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
DROP TABLE execution_rewards_finalized; | ||
-- +goose StatementEnd |
File renamed without changes.