CH Migration: exit page hostname on sessions_v2 (#3953)

* CH Migration: exit/entry hostnames in sessions_v2

* Leave only exit_page_hostname, we already record hostnames

* Use ClickHouse DDL in favour of ecto so that cluster is included

* Compress with ZSTD(3)
pull/3968/head^2 r2024.04.03-421
hq1 3 years ago committed by GitHub
parent 9f27fa303c
commit 1f778e0c11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,19 @@
defmodule Plausible.ClickhouseRepo.Migrations.HostnamesInSessions do
use Ecto.Migration
def up do
execute """
ALTER TABLE sessions_v2
#{Plausible.MigrationUtils.on_cluster_statement("sessions_v2")}
ADD COLUMN exit_page_hostname String CODEC(ZSTD(3))
"""
end
def down do
execute """
ALTER TABLE sessions_v2
#{Plausible.MigrationUtils.on_cluster_statement("sessions_v2")}
DROP COLUMN exit_page_hostname
"""
end
end
Loading…
Cancel
Save