mirror of
https://github.com/plausible/analytics.git
synced 2024-12-24 01:54:34 +03:00
14 lines
398 B
Elixir
14 lines
398 B
Elixir
CREATE TABLE IF NOT EXISTS location_data <%= if @cluster? do %>ON CLUSTER '{cluster}'<% end %>
|
|
(
|
|
`type` LowCardinality(String),
|
|
`id` String,
|
|
`name` String
|
|
)
|
|
<%= if @cluster? do %>
|
|
ENGINE = ReplicatedMergeTree('/clickhouse/{cluster}/tables/{shard}/plausible_prod/location_data', '{replica}')
|
|
<% else %>
|
|
ENGINE = MergeTree()
|
|
<% end %>
|
|
ORDER BY (type, id)
|
|
SETTINGS index_granularity = 128
|