Dev (#2719)
* fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * feat(chalice): autocomplete return top 10 with stats * fix(chalice): fixed autocomplete top 10 meta-filters * refactor(DB): added web_vitals to pages table * refactor(DB): added session_integrations table
This commit is contained in:
parent
5b5a3033d0
commit
eaf762e1bd
6 changed files with 89 additions and 36 deletions
|
|
@ -23,6 +23,18 @@ UPDATE public.roles
|
|||
SET permissions='{SERVICE_SESSION_REPLAY,SERVICE_DEV_TOOLS,SERVICE_ASSIST_LIVE,SERVICE_ASSIST_CALL,SERVICE_READ_NOTES}'
|
||||
WHERE service_role;
|
||||
|
||||
ALTER TABLE IF EXISTS events.pages
|
||||
ADD COLUMN IF NOT EXISTS web_vitals text DEFAULT NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public.session_integrations
|
||||
(
|
||||
session_id bigint NOT NULL REFERENCES public.sessions (session_id) ON DELETE CASCADE,
|
||||
project_id integer NOT NULL REFERENCES public.projects (project_id) ON DELETE CASCADE,
|
||||
provider text NOT NULL,
|
||||
created_at timestamp without time zone NOT NULL DEFAULT timezone('utc'::text, now()),
|
||||
PRIMARY KEY (session_id, project_id, provider)
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
|
||||
\elif :is_next
|
||||
|
|
|
|||
|
|
@ -633,6 +633,7 @@ CREATE TABLE events.pages
|
|||
response_time bigint DEFAULT NULL,
|
||||
response_end bigint DEFAULT NULL,
|
||||
ttfb integer DEFAULT NULL,
|
||||
web_vitals text DEFAULT NULL,
|
||||
PRIMARY KEY (session_id, message_id)
|
||||
);
|
||||
CREATE INDEX pages_session_id_idx ON events.pages (session_id);
|
||||
|
|
@ -1370,4 +1371,13 @@ CREATE TABLE IF NOT EXISTS spots.tasks
|
|||
added_time timestamp NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public.session_integrations
|
||||
(
|
||||
session_id bigint NOT NULL REFERENCES public.sessions (session_id) ON DELETE CASCADE,
|
||||
project_id integer NOT NULL REFERENCES public.projects (project_id) ON DELETE CASCADE,
|
||||
provider text NOT NULL,
|
||||
created_at timestamp without time zone NOT NULL DEFAULT timezone('utc'::text, now()),
|
||||
PRIMARY KEY (session_id, project_id, provider)
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -17,6 +17,11 @@ $$ LANGUAGE sql IMMUTABLE;
|
|||
$fn_def$, :'next_version')
|
||||
\gexec
|
||||
|
||||
ALTER TABLE IF EXISTS events.pages
|
||||
DROP COLUMN IF EXISTS web_vitals
|
||||
|
||||
DROP TABLE IF EXISTS public.session_integrations;
|
||||
|
||||
COMMIT;
|
||||
|
||||
\elif :is_next
|
||||
|
|
|
|||
|
|
@ -19,6 +19,17 @@ $fn_def$, :'next_version')
|
|||
|
||||
--
|
||||
|
||||
ALTER TABLE IF EXISTS events.pages
|
||||
ADD COLUMN IF NOT EXISTS web_vitals text DEFAULT NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public.session_integrations
|
||||
(
|
||||
session_id bigint NOT NULL REFERENCES public.sessions (session_id) ON DELETE CASCADE,
|
||||
project_id integer NOT NULL REFERENCES public.projects (project_id) ON DELETE CASCADE,
|
||||
provider text NOT NULL,
|
||||
created_at timestamp without time zone NOT NULL DEFAULT timezone('utc'::text, now()),
|
||||
PRIMARY KEY (session_id, project_id, provider)
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
|
||||
|
|
|
|||
|
|
@ -594,6 +594,7 @@ CREATE TABLE events.pages
|
|||
response_time bigint DEFAULT NULL,
|
||||
response_end bigint DEFAULT NULL,
|
||||
ttfb integer DEFAULT NULL,
|
||||
web_vitals text DEFAULT NULL,
|
||||
PRIMARY KEY (session_id, message_id)
|
||||
);
|
||||
CREATE INDEX pages_session_id_idx ON events.pages (session_id);
|
||||
|
|
@ -1255,4 +1256,13 @@ CREATE TABLE IF NOT EXISTS spots.tasks
|
|||
added_time timestamp NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public.session_integrations
|
||||
(
|
||||
session_id bigint NOT NULL REFERENCES public.sessions (session_id) ON DELETE CASCADE,
|
||||
project_id integer NOT NULL REFERENCES public.projects (project_id) ON DELETE CASCADE,
|
||||
provider text NOT NULL,
|
||||
created_at timestamp without time zone NOT NULL DEFAULT timezone('utc'::text, now()),
|
||||
PRIMARY KEY (session_id, project_id, provider)
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -17,6 +17,11 @@ $$ LANGUAGE sql IMMUTABLE;
|
|||
$fn_def$, :'next_version')
|
||||
\gexec
|
||||
|
||||
ALTER TABLE IF EXISTS events.pages
|
||||
DROP COLUMN IF EXISTS web_vitals;
|
||||
|
||||
DROP TABLE IF EXISTS public.session_integrations;
|
||||
|
||||
COMMIT;
|
||||
|
||||
\elif :is_next
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue