mirror of
https://github.com/plausible/analytics.git
synced 2024-11-24 04:32:57 +03:00
4b36bb7138
* Use clickhouse-ecto for stats * Use clickhouse ecto instead of low-level clickhousex * Remove defaults from event schema * Remove all references to Clickhousex * Document configuration change * Ensure createdb and migrations can be run in a release * Remove config added for debug * Update plausible_variables.sample.env
11 lines
335 B
Elixir
11 lines
335 B
Elixir
defmodule Mix.Tasks.CleanClickhouse do
|
|
use Mix.Task
|
|
|
|
def run(_) do
|
|
clean_events = "ALTER TABLE events DELETE WHERE 1"
|
|
clean_sessions = "ALTER TABLE sessions DELETE WHERE 1"
|
|
Ecto.Adapters.SQL.query!(Plausible.ClickhouseRepo, clean_events)
|
|
Ecto.Adapters.SQL.query!(Plausible.ClickhouseRepo, clean_sessions)
|
|
end
|
|
end
|