mirror of
https://github.com/plausible/analytics.git
synced 2024-12-18 14:51:57 +03:00
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
|