feat(DB): added screen_width & screen_height (#2054)
This commit is contained in:
parent
bb09e59bf4
commit
e4c120ba60
6 changed files with 24 additions and 6 deletions
|
|
@ -1 +1,5 @@
|
|||
CREATE OR REPLACE FUNCTION openreplay_version AS() -> 'v1.18.0-ee';
|
||||
CREATE OR REPLACE FUNCTION openreplay_version AS() -> 'v1.18.0-ee';
|
||||
|
||||
ALTER TABLE experimental.sessions
|
||||
ADD COLUMN IF NOT EXISTS screen_width Nullable(Int16),
|
||||
ADD COLUMN IF NOT EXISTS screen_height Nullable(Int16);
|
||||
|
|
@ -144,6 +144,12 @@ CREATE TABLE IF NOT EXISTS experimental.sessions
|
|||
utm_campaign Nullable(String),
|
||||
user_id Nullable(String),
|
||||
user_anonymous_id Nullable(String),
|
||||
issue_types Array(LowCardinality(String)),
|
||||
referrer Nullable(String),
|
||||
base_referrer Nullable(String) MATERIALIZED lower(concat(domain(referrer), path(referrer))),
|
||||
issue_score Nullable(UInt32),
|
||||
screen_width Nullable(Int16),
|
||||
screen_height Nullable(Int16),
|
||||
metadata_1 Nullable(String),
|
||||
metadata_2 Nullable(String),
|
||||
metadata_3 Nullable(String),
|
||||
|
|
@ -154,10 +160,6 @@ CREATE TABLE IF NOT EXISTS experimental.sessions
|
|||
metadata_8 Nullable(String),
|
||||
metadata_9 Nullable(String),
|
||||
metadata_10 Nullable(String),
|
||||
issue_types Array(LowCardinality(String)),
|
||||
referrer Nullable(String),
|
||||
base_referrer Nullable(String) MATERIALIZED lower(concat(domain(referrer), path(referrer))),
|
||||
issue_score Nullable(UInt32),
|
||||
_timestamp DateTime DEFAULT now()
|
||||
) ENGINE = ReplacingMergeTree(_timestamp)
|
||||
PARTITION BY toYYYYMMDD(datetime)
|
||||
|
|
|
|||
|
|
@ -19,9 +19,13 @@ $fn_def$, :'next_version')
|
|||
|
||||
--
|
||||
DROP FUNCTION IF EXISTS events.funnel(steps integer[], m integer);
|
||||
ALTER TABLE public.assist_records
|
||||
ALTER TABLE IF EXISTS public.assist_records
|
||||
ALTER COLUMN session_id DROP NOT NULL;
|
||||
|
||||
ALTER TABLE IF EXISTS public.sessions
|
||||
ADD COLUMN IF NOT EXISTS screen_width integer DEFAULT NULL,
|
||||
ADD COLUMN IF NOT EXISTS screen_height integer DEFAULT NULL;
|
||||
|
||||
COMMIT;
|
||||
|
||||
\elif :is_next
|
||||
|
|
|
|||
|
|
@ -442,6 +442,8 @@ CREATE TABLE public.sessions
|
|||
base_referrer text NULL DEFAULT NULL,
|
||||
file_key bytea DEFAULT NULL,
|
||||
has_ut_test boolean DEFAULT FALSE,
|
||||
screen_width integer DEFAULT NULL,
|
||||
screen_height integer DEFAULT NULL,
|
||||
metadata_1 text DEFAULT NULL,
|
||||
metadata_2 text DEFAULT NULL,
|
||||
metadata_3 text DEFAULT NULL,
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ $fn_def$, :'next_version')
|
|||
--
|
||||
DROP FUNCTION IF EXISTS events.funnel(steps integer[], m integer);
|
||||
|
||||
ALTER TABLE IF EXISTS public.sessions
|
||||
ADD COLUMN IF NOT EXISTS screen_width integer DEFAULT NULL,
|
||||
ADD COLUMN IF NOT EXISTS screen_height integer DEFAULT NULL;
|
||||
|
||||
COMMIT;
|
||||
|
||||
\elif :is_next
|
||||
|
|
|
|||
|
|
@ -403,6 +403,8 @@ CREATE TABLE public.sessions
|
|||
referrer text NULL DEFAULT NULL,
|
||||
base_referrer text NULL DEFAULT NULL,
|
||||
has_ut_test boolean DEFAULT FALSE,
|
||||
screen_width integer DEFAULT NULL,
|
||||
screen_height integer DEFAULT NULL,
|
||||
metadata_1 text DEFAULT NULL,
|
||||
metadata_2 text DEFAULT NULL,
|
||||
metadata_3 text DEFAULT NULL,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue