Fixed bounce/session statistics and updated pirsch to dev version.

This commit is contained in:
Marvin Blum
2020-09-14 21:46:38 +02:00
committed by Marvin Blum
parent 5469b3722a
commit 61685488cd
5 changed files with 34 additions and 9 deletions

View File

@@ -0,0 +1,23 @@
ALTER TABLE "hit" ADD COLUMN "screen_width" integer DEFAULT 0;
ALTER TABLE "hit" ADD COLUMN "screen_height" integer DEFAULT 0;
CREATE TABLE "screen_stats" (
id bigint NOT NULL UNIQUE,
tenant_id bigint,
day date NOT NULL,
visitors integer NOT NULL,
width integer NOT NULL,
height integer NOT NULL
);
CREATE SEQUENCE screen_stats_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE screen_stats_id_seq OWNED BY "screen_stats".id;
ALTER TABLE ONLY "screen_stats" ALTER COLUMN id SET DEFAULT nextval('screen_stats_id_seq'::regclass);
ALTER TABLE ONLY "screen_stats" ADD CONSTRAINT screen_stats_pkey PRIMARY KEY (id);
CREATE INDEX screen_stats_day_index ON screen_stats(day);