Skip to content

Commit 4dbe124

Browse files
committed
feat(migrations): add finalized el rewards table
1 parent fb25b14 commit 4dbe124

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-- +goose Up
2+
-- +goose StatementBegin
3+
CREATE TABLE execution_rewards_finalized (
4+
epoch int4 NOT NULL,
5+
slot int4 NOT NULL,
6+
proposer int4 NOT NULL,
7+
value numeric NOT NULL,
8+
CONSTRAINT finalized_execution_rewards_pk PRIMARY KEY (slot)
9+
);
10+
-- +goose StatementEnd
11+
-- +goose StatementBegin
12+
CREATE INDEX finalized_execution_rewards_epoch_idx ON execution_rewards_finalized USING btree (epoch);
13+
-- +goose StatementEnd
14+
-- +goose StatementBegin
15+
CREATE UNIQUE INDEX finalized_execution_rewards_proposer_idx ON execution_rewards_finalized USING btree (proposer, slot);
16+
-- +goose StatementEnd
17+
18+
-- +goose Down
19+
-- +goose StatementBegin
20+
DROP TABLE execution_rewards_finalized;
21+
-- +goose StatementEnd

0 commit comments

Comments
 (0)