Add active_visitors column to imported_pages CH table (#4028)

This commit is contained in:
Adrian Gruntkowski 2024-04-22 09:34:01 +02:00 committed by GitHub
parent fede2f0a8a
commit 069170eb1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,19 @@
defmodule Plausible.IngestRepo.Migrations.AddActiveVisitorsToImportedPages do
use Ecto.Migration
def up do
execute """
ALTER TABLE imported_pages
#{Plausible.MigrationUtils.on_cluster_statement("imported_pages")}
ADD COLUMN active_visitors UInt64
"""
end
def down do
execute """
ALTER TABLE imported_pages
#{Plausible.MigrationUtils.on_cluster_statement("imported_pages")}
DROP COLUMN active_visitors
"""
end
end