Skip to content

Commit 586ae75

Browse files
committed
feat: add migrations for validator-tagger-lido-csm-module
1 parent 2877921 commit 586ae75

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-- +goose Up
2+
-- +goose StatementBegin
3+
-- Lido Simple DVT: Node operators (minimal fields)
4+
CREATE TABLE IF NOT EXISTS lido_simple_dvt_node_operators (
5+
operator_id BIGINT PRIMARY KEY,
6+
signing_key_count BIGINT NOT NULL DEFAULT 0,
7+
name text not null default ''
8+
);
9+
10+
-- Lido CSM: Signing keys per operator
11+
CREATE TABLE IF NOT EXISTS lido_simple_dvt_signing_keys (
12+
operator_id BIGINT NOT NULL REFERENCES lido_simple_dvt_node_operators(operator_id) ON DELETE CASCADE,
13+
pubkey BYTEA NOT NULL,
14+
PRIMARY KEY (operator_id, pubkey)
15+
);
16+
CREATE INDEX IF NOT EXISTS idx_lido_simple_dvt_signing_keys_operator_id ON lido_simple_dvt_signing_keys (operator_id);
17+
CREATE INDEX IF NOT EXISTS idx_lido_simple_dvt_signing_keys_pubkey ON lido_simple_dvt_signing_keys (pubkey);
18+
-- +goose StatementEnd
19+
20+
-- +goose Down
21+
-- +goose StatementBegin
22+
DROP TABLE IF EXISTS lido_simple_dvt_signing_keys;
23+
DROP TABLE IF EXISTS lido_simple_dvt_node_operators;
24+
-- +goose StatementEnd

0 commit comments

Comments
 (0)