Skip to content

Commit

Permalink
feat(deploy/migrations): add replacing merge trees fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Savid committed Jan 26, 2024
1 parent 2a8009a commit 1c8a7c6
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
DROP TABLE IF EXISTS canonical_beacon_block on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block on cluster '{cluster}' AS canonical_beacon_block_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_local, rand());

DROP TABLE IF EXISTS canonical_beacon_block_proposer_slashing on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_proposer_slashing on cluster '{cluster}' AS canonical_beacon_block_proposer_slashing_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_proposer_slashing_local, rand());

DROP TABLE IF EXISTS canonical_beacon_block_attester_slashing on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_attester_slashing on cluster '{cluster}' AS canonical_beacon_block_attester_slashing_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_attester_slashing_local, rand());

DROP TABLE IF EXISTS canonical_beacon_block_bls_to_execution_change on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_bls_to_execution_change on cluster '{cluster}' AS canonical_beacon_block_bls_to_execution_change_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_bls_to_execution_change_local, rand());

DROP TABLE IF EXISTS canonical_beacon_block_execution_transaction on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_execution_transaction on cluster '{cluster}' AS canonical_beacon_block_execution_transaction_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_execution_transaction_local, rand());

DROP TABLE IF EXISTS canonical_beacon_block_voluntary_exit on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_voluntary_exit on cluster '{cluster}' AS canonical_beacon_block_voluntary_exit_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_voluntary_exit_local, rand());

DROP TABLE IF EXISTS canonical_beacon_block_deposit on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_deposit on cluster '{cluster}' AS canonical_beacon_block_deposit_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_deposit_local, rand());

DROP TABLE IF EXISTS canonical_beacon_block_withdrawal on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_withdrawal on cluster '{cluster}' AS canonical_beacon_block_withdrawal_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_withdrawal_local, rand());

DROP TABLE IF EXISTS beacon_block_classification on cluster '{cluster}' SYNC;
CREATE TABLE beacon_block_classification on cluster '{cluster}' AS beacon_block_classification_local
ENGINE = Distributed('{cluster}', default, beacon_block_classification_local, rand());

DROP TABLE IF EXISTS canonical_beacon_blob_sidecar on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_blob_sidecar on cluster '{cluster}' AS canonical_beacon_blob_sidecar_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_blob_sidecar_local, rand());

DROP TABLE IF EXISTS mempool_dumpster_transaction on cluster '{cluster}' SYNC;
CREATE TABLE mempool_dumpster_transaction on cluster '{cluster}' AS mempool_dumpster_transaction_local
ENGINE = Distributed('{cluster}', default, mempool_dumpster_transaction_local, rand());

DROP TABLE IF EXISTS block_native_mempool_transaction on cluster '{cluster}' SYNC;
CREATE TABLE block_native_mempool_transaction on cluster '{cluster}' AS block_native_mempool_transaction_local
ENGINE = Distributed('{cluster}', default, block_native_mempool_transaction_local, rand());

DROP TABLE IF EXISTS beacon_p2p_attestation on cluster '{cluster}' SYNC;
CREATE TABLE beacon_p2p_attestation on cluster '{cluster}' AS beacon_p2p_attestation_local
ENGINE = Distributed('{cluster}', default, beacon_p2p_attestation_local, rand());

DROP TABLE IF EXISTS canonical_beacon_proposer_duty on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_proposer_duty on cluster '{cluster}' AS canonical_beacon_proposer_duty_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_proposer_duty_local, rand());

DROP TABLE IF EXISTS canonical_beacon_elaborated_attestation on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_elaborated_attestation on cluster '{cluster}' AS canonical_beacon_elaborated_attestation_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_elaborated_attestation_local, rand());
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
DROP TABLE IF EXISTS canonical_beacon_block on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block on cluster '{cluster}' AS canonical_beacon_block_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_local, cityHash64(slot_start_date_time, meta_network_name));

DROP TABLE IF EXISTS canonical_beacon_block_proposer_slashing on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_proposer_slashing on cluster '{cluster}' AS canonical_beacon_block_proposer_slashing_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_proposer_slashing_local, cityHash64(slot_start_date_time, unique_key, meta_network_name));

DROP TABLE IF EXISTS canonical_beacon_block_attester_slashing on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_attester_slashing on cluster '{cluster}' AS canonical_beacon_block_attester_slashing_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_attester_slashing_local, cityHash64(slot_start_date_time, unique_key, meta_network_name));

DROP TABLE IF EXISTS canonical_beacon_block_bls_to_execution_change on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_bls_to_execution_change on cluster '{cluster}' AS canonical_beacon_block_bls_to_execution_change_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_bls_to_execution_change_local, cityHash64(slot_start_date_time, unique_key, meta_network_name));

DROP TABLE IF EXISTS canonical_beacon_block_execution_transaction on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_execution_transaction on cluster '{cluster}' AS canonical_beacon_block_execution_transaction_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_execution_transaction_local, cityHash64(slot_start_date_time, unique_key, meta_network_name));

DROP TABLE IF EXISTS canonical_beacon_block_voluntary_exit on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_voluntary_exit on cluster '{cluster}' AS canonical_beacon_block_voluntary_exit_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_voluntary_exit_local, cityHash64(slot_start_date_time, unique_key, meta_network_name));

DROP TABLE IF EXISTS canonical_beacon_block_deposit on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_deposit on cluster '{cluster}' AS canonical_beacon_block_deposit_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_deposit_local, cityHash64(slot_start_date_time, unique_key, meta_network_name));

DROP TABLE IF EXISTS canonical_beacon_block_withdrawal on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_block_withdrawal on cluster '{cluster}' AS canonical_beacon_block_withdrawal_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_block_withdrawal_local, cityHash64(slot_start_date_time, unique_key, meta_network_name));

DROP TABLE IF EXISTS beacon_block_classification on cluster '{cluster}' SYNC;
CREATE TABLE beacon_block_classification on cluster '{cluster}' AS beacon_block_classification_local
ENGINE = Distributed('{cluster}', default, beacon_block_classification_local, cityHash64(slot_start_date_time, meta_network_name));

DROP TABLE IF EXISTS canonical_beacon_blob_sidecar on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_blob_sidecar on cluster '{cluster}' AS canonical_beacon_blob_sidecar_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_blob_sidecar_local, cityHash64(slot_start_date_time, unique_key, meta_network_name));

DROP TABLE IF EXISTS mempool_dumpster_transaction on cluster '{cluster}' SYNC;
CREATE TABLE mempool_dumpster_transaction on cluster '{cluster}' AS mempool_dumpster_transaction_local
ENGINE = Distributed('{cluster}', default, mempool_dumpster_transaction_local, cityHash64(timestamp, unique_key, chain_id));

DROP TABLE IF EXISTS block_native_mempool_transaction on cluster '{cluster}' SYNC;
CREATE TABLE block_native_mempool_transaction on cluster '{cluster}' AS block_native_mempool_transaction_local
ENGINE = Distributed('{cluster}', default, block_native_mempool_transaction_local, cityHash64(detecttime, unique_key, network));

DROP TABLE IF EXISTS beacon_p2p_attestation on cluster '{cluster}' SYNC;
CREATE TABLE beacon_p2p_attestation on cluster '{cluster}' AS beacon_p2p_attestation_local
ENGINE = Distributed('{cluster}', default, beacon_p2p_attestation_local, cityHash64(slot_start_date_time, unique_key, meta_network_name));

DROP TABLE IF EXISTS canonical_beacon_proposer_duty on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_proposer_duty on cluster '{cluster}' AS canonical_beacon_proposer_duty_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_proposer_duty_local, cityHash64(slot_start_date_time, unique_key, meta_network_name));

DROP TABLE IF EXISTS canonical_beacon_elaborated_attestation on cluster '{cluster}' SYNC;
CREATE TABLE canonical_beacon_elaborated_attestation on cluster '{cluster}' AS canonical_beacon_elaborated_attestation_local
ENGINE = Distributed('{cluster}', default, canonical_beacon_elaborated_attestation_local, cityHash64(slot_start_date_time, unique_key, meta_network_name));

0 comments on commit 1c8a7c6

Please sign in to comment.