mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Initial commit.
This commit is contained in:
commit
f7f0c05e12
27 changed files with 13028 additions and 0 deletions
33
sql/schema.sql
Normal file
33
sql/schema.sql
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
create table website (
|
||||
website_id uuid primary key,
|
||||
hostname varchar(255) unique not null,
|
||||
created_at timestamp with time zone default current_timestamp
|
||||
);
|
||||
|
||||
create table session (
|
||||
session_id uuid primary key,
|
||||
website_id uuid references website(website_id) on delete cascade,
|
||||
created_at timestamp with time zone default current_timestamp,
|
||||
browser varchar(20),
|
||||
os varchar(20),
|
||||
screen varchar(11),
|
||||
language varchar(35),
|
||||
country char(2)
|
||||
);
|
||||
|
||||
create table pageview (
|
||||
view_id serial primary key,
|
||||
session_id uuid references session(session_id) on delete cascade,
|
||||
created_at timestamp with time zone default current_timestamp,
|
||||
url varchar(500) not null,
|
||||
referrer varchar(500)
|
||||
);
|
||||
|
||||
create table event (
|
||||
event_id serial primary key,
|
||||
session_id uuid references session(session_id) on delete cascade,
|
||||
created_at timestamp with time zone default current_timestamp,
|
||||
url varchar(500) not null,
|
||||
event_type varchar(50) not null,
|
||||
event_value varchar(255) not null
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue