mirror of
https://github.com/Kugelschieber/marvinblum.git
synced 2026-01-18 14:50:27 +00:00
Updated pirsch and added country statistics to tracking page.
This commit is contained in:
21
schema/0003_pirsch_update.up.sql
Normal file
21
schema/0003_pirsch_update.up.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
ALTER TABLE "hit" ADD COLUMN "country_code" character varying(2);
|
||||
|
||||
CREATE TABLE "country_stats" (
|
||||
id bigint NOT NULL UNIQUE,
|
||||
tenant_id bigint,
|
||||
day date NOT NULL,
|
||||
visitors integer NOT NULL,
|
||||
country_code character varying(2)
|
||||
);
|
||||
|
||||
CREATE SEQUENCE country_stats_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
ALTER SEQUENCE country_stats_id_seq OWNED BY "country_stats".id;
|
||||
ALTER TABLE ONLY "country_stats" ALTER COLUMN id SET DEFAULT nextval('country_stats_id_seq'::regclass);
|
||||
ALTER TABLE ONLY "country_stats" ADD CONSTRAINT country_stats_pkey PRIMARY KEY (id);
|
||||
CREATE INDEX country_stats_day_index ON country_stats(day);
|
||||
Reference in New Issue
Block a user