mirror of
https://github.com/plausible/analytics.git
synced 2024-12-02 07:38:47 +03:00
6d79ca5093
* another clickhouse adapter * don't restore stats_removal.ex * fix events main-graph error (#2746) * update ch, chto * update chto again (#2759) * Stop treating page filter as an entry_page filter (#2752) * remove dead code * stop treating page filter as entry page filter in breakdown queries * stop treating page filter as entry page filter in aggregate queries * stop treating page filter as entry page filter in timeseries queries * mix format * update changelog * break code down to smaller functions to keep credo happy * remove unused functions * make CSV export return only conversions with goal filter (#2760) * make CSV export return only conversions with goal filter * update changelog * update elixir version in mix.exs (#2742) * revert admin.ex changes (#2776) --------- Co-authored-by: ruslandoga <67764432+ruslandoga@users.noreply.github.com> Co-authored-by: ruslandoga <rusl@n-do.ga> Co-authored-by: RobertJoonas <56999674+RobertJoonas@users.noreply.github.com>
16 lines
361 B
Elixir
16 lines
361 B
Elixir
defmodule Mix.Tasks.CleanClickhouse do
|
|
use Mix.Task
|
|
|
|
alias Plausible.IngestRepo
|
|
|
|
def run(_) do
|
|
%{rows: rows} = IngestRepo.query!("show tables")
|
|
tables = Enum.map(rows, fn [table] -> table end)
|
|
to_truncate = tables -- ["schema_migrations"]
|
|
|
|
Enum.each(to_truncate, fn table ->
|
|
IngestRepo.query!("truncate #{table}")
|
|
end)
|
|
end
|
|
end
|