Skip to content

Commit ca59ecb

Browse files
committed
Order clickhouse migrations
1 parent 685bb26 commit ca59ecb

11 files changed

+17
-2
lines changed

internal/tools/clickhouse/clickhouse_create_token_balances_mv.sql renamed to internal/tools/clickhouse/0009_clickhouse_create_token_balances_mv.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CREATE TABLE IF NOT EXISTS token_balances
1818
)
1919
ENGINE = SummingMergeTree
2020
ORDER BY (token_type, chain_id, owner, address, token_id)
21-
SETTINGS index_granularity = 8192, lightweight_mutation_projection_mode = 'rebuild';
21+
SETTINGS index_granularity = 8192, lightweight_mutation_projection_mode = 'rebuild', deduplicate_merge_projection_mode = 'rebuild';
2222

2323
CREATE MATERIALIZED VIEW IF NOT EXISTS single_token_transfers_mv TO token_balances AS
2424
SELECT chain_id, owner, address, token_type, token_id, sum(amount) as balance

0 commit comments

Comments
 (0)