From 9bf5c53296e95f75946fec5361a19569d6bda31b Mon Sep 17 00:00:00 2001 From: Adrian Gruntkowski Date: Wed, 3 Apr 2024 13:46:36 +0200 Subject: [PATCH] Extend `Imported*` schemas with newly added columns --- lib/plausible/imported/browser.ex | 2 ++ lib/plausible/imported/device.ex | 1 + lib/plausible/imported/entry_page.ex | 1 + lib/plausible/imported/exit_page.ex | 5 ++++- lib/plausible/imported/location.ex | 1 + lib/plausible/imported/operating_system.ex | 2 ++ lib/plausible/imported/page.ex | 1 + lib/plausible/imported/source.ex | 3 +++ 8 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/plausible/imported/browser.ex b/lib/plausible/imported/browser.ex index 5523bb061..bf39470e5 100644 --- a/lib/plausible/imported/browser.ex +++ b/lib/plausible/imported/browser.ex @@ -8,9 +8,11 @@ defmodule Plausible.Imported.Browser do field :import_id, Ch, type: "UInt64" field :date, :date field :browser, :string + field :browser_version, :string field :visitors, Ch, type: "UInt64" field :visits, Ch, type: "UInt64" field :visit_duration, Ch, type: "UInt64" + field :pageviews, Ch, type: "UInt64" field :bounces, Ch, type: "UInt32" end end diff --git a/lib/plausible/imported/device.ex b/lib/plausible/imported/device.ex index 39a7d9aa4..c07e058e4 100644 --- a/lib/plausible/imported/device.ex +++ b/lib/plausible/imported/device.ex @@ -11,6 +11,7 @@ defmodule Plausible.Imported.Device do field :visitors, Ch, type: "UInt64" field :visits, Ch, type: "UInt64" field :visit_duration, Ch, type: "UInt64" + field :pageviews, Ch, type: "UInt64" field :bounces, Ch, type: "UInt32" end end diff --git a/lib/plausible/imported/entry_page.ex b/lib/plausible/imported/entry_page.ex index 9141bf41a..294e9b057 100644 --- a/lib/plausible/imported/entry_page.ex +++ b/lib/plausible/imported/entry_page.ex @@ -11,6 +11,7 @@ defmodule Plausible.Imported.EntryPage do field :visitors, Ch, type: "UInt64" field :entrances, Ch, type: "UInt64" field :visit_duration, Ch, type: "UInt64" + field :pageviews, Ch, type: "UInt64" field :bounces, Ch, type: "UInt32" end end diff --git a/lib/plausible/imported/exit_page.ex b/lib/plausible/imported/exit_page.ex index 94bd3ab7c..a057fe721 100644 --- a/lib/plausible/imported/exit_page.ex +++ b/lib/plausible/imported/exit_page.ex @@ -8,7 +8,10 @@ defmodule Plausible.Imported.ExitPage do field :import_id, Ch, type: "UInt64" field :date, :date field :exit_page, :string - field :visitors, Ch, type: "UInt64" field :exits, Ch, type: "UInt64" + field :visitors, Ch, type: "UInt64" + field :visit_duration, Ch, type: "UInt64" + field :pageviews, Ch, type: "UInt64" + field :bounces, Ch, type: "UInt32" end end diff --git a/lib/plausible/imported/location.ex b/lib/plausible/imported/location.ex index 1b9e27c4f..2d7825bbe 100644 --- a/lib/plausible/imported/location.ex +++ b/lib/plausible/imported/location.ex @@ -13,6 +13,7 @@ defmodule Plausible.Imported.Location do field :visitors, Ch, type: "UInt64" field :visits, Ch, type: "UInt64" field :visit_duration, Ch, type: "UInt64" + field :pageviews, Ch, type: "UInt64" field :bounces, Ch, type: "UInt32" end end diff --git a/lib/plausible/imported/operating_system.ex b/lib/plausible/imported/operating_system.ex index 3069ac39b..90666de76 100644 --- a/lib/plausible/imported/operating_system.ex +++ b/lib/plausible/imported/operating_system.ex @@ -8,9 +8,11 @@ defmodule Plausible.Imported.OperatingSystem do field :import_id, Ch, type: "UInt64" field :date, :date field :operating_system, :string + field :operating_system_version, :string field :visitors, Ch, type: "UInt64" field :visits, Ch, type: "UInt64" field :visit_duration, Ch, type: "UInt64" + field :pageviews, Ch, type: "UInt64" field :bounces, Ch, type: "UInt32" end end diff --git a/lib/plausible/imported/page.ex b/lib/plausible/imported/page.ex index 390463e06..ce9207061 100644 --- a/lib/plausible/imported/page.ex +++ b/lib/plausible/imported/page.ex @@ -9,6 +9,7 @@ defmodule Plausible.Imported.Page do field :date, :date field :hostname, :string field :page, :string + field :visits, Ch, type: "UInt64" field :visitors, Ch, type: "UInt64" field :pageviews, Ch, type: "UInt64" field :exits, Ch, type: "UInt64" diff --git a/lib/plausible/imported/source.ex b/lib/plausible/imported/source.ex index 3ea5cc619..cc703f9a4 100644 --- a/lib/plausible/imported/source.ex +++ b/lib/plausible/imported/source.ex @@ -8,6 +8,8 @@ defmodule Plausible.Imported.Source do field :import_id, Ch, type: "UInt64" field :date, :date field :source, :string + field :referrer, :string + field :utm_source, :string field :utm_medium, :string field :utm_campaign, :string field :utm_content, :string @@ -15,6 +17,7 @@ defmodule Plausible.Imported.Source do field :visitors, Ch, type: "UInt64" field :visits, Ch, type: "UInt64" field :visit_duration, Ch, type: "UInt64" + field :pageviews, Ch, type: "UInt64" field :bounces, Ch, type: "UInt32" end end