Skip to content

Commit

Permalink
add migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Savid committed Jun 4, 2024
1 parent da4a247 commit 1fc8a0a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ ON CLUSTER '{cluster}' (
propagation_slot_start_diff UInt32 Codec(ZSTD(1)),
proposer_index UInt32 CODEC(ZSTD(1)),
blob_index UInt32 CODEC(ZSTD(1)),
parent_root FixedString(66) Codec(ZSTD(1)),
state_root FixedString(66) Codec(ZSTD(1)),
peer_id_unique_key Int64,
message_id String CODEC(ZSTD(1)),
message_size UInt32 Codec(ZSTD(1)),
Expand Down Expand Up @@ -61,8 +59,6 @@ COMMENT COLUMN propagation_slot_start_diff 'Difference in slot start time for pr
COMMENT COLUMN proposer_index 'The proposer index of the beacon block',
COMMENT COLUMN blob_index 'Blob index associated with the record',
COMMENT COLUMN peer_id_unique_key 'Unique key associated with the identifier of the peer',
COMMENT COLUMN parent_root 'Parent root of the beacon block',
COMMENT COLUMN state_root 'State root of the beacon block',
COMMENT COLUMN message_id 'Identifier of the message',
COMMENT COLUMN message_size 'Size of the message in bytes',
COMMENT COLUMN topic_layer 'Layer of the topic in the gossipsub protocol',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ALTER TABLE libp2p_gossipsub_blob_sidecar_local on cluster '{cluster}'
DROP COLUMN parent_root;

ALTER TABLE libp2p_gossipsub_blob_sidecar on cluster '{cluster}'
DROP COLUMN parent_root;

ALTER TABLE libp2p_gossipsub_blob_sidecar_local on cluster '{cluster}'
DROP COLUMN state_root;

ALTER TABLE libp2p_gossipsub_blob_sidecar on cluster '{cluster}'
DROP COLUMN state_root;
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ALTER TABLE libp2p_gossipsub_blob_sidecar_local on cluster '{cluster}'
ADD COLUMN parent_root FixedString(66) Codec(ZSTD(1)) AFTER blob_index;

ALTER TABLE libp2p_gossipsub_blob_sidecar on cluster '{cluster}'
ADD COLUMN parent_root FixedString(66) Codec(ZSTD(1)) AFTER blob_index;

ALTER TABLE libp2p_gossipsub_blob_sidecar_local on cluster '{cluster}'
COMMENT COLUMN parent_root 'Parent root of the beacon block';

ALTER TABLE libp2p_gossipsub_blob_sidecar on cluster '{cluster}'
COMMENT COLUMN parent_root 'Parent root of the beacon block';

ALTER TABLE libp2p_gossipsub_blob_sidecar_local on cluster '{cluster}'
ADD COLUMN state_root FixedString(66) Codec(ZSTD(1)) AFTER parent_root;

ALTER TABLE libp2p_gossipsub_blob_sidecar on cluster '{cluster}'
ADD COLUMN state_root FixedString(66) Codec(ZSTD(1)) AFTER parent_root;

ALTER TABLE libp2p_gossipsub_blob_sidecar_local on cluster '{cluster}'
COMMENT COLUMN state_root 'State root of the beacon block';

ALTER TABLE libp2p_gossipsub_blob_sidecar on cluster '{cluster}'
COMMENT COLUMN state_root 'State root of the beacon block';

0 comments on commit 1fc8a0a

Please sign in to comment.