-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(migrations): add finalized el rewards table
- Loading branch information
1 parent
fb25b14
commit 4dbe124
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...g/commons/db/migrations/postgres/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 |