DB Schema.

This commit is contained in:
severak 2020-01-15 14:24:55 +01:00
parent e6e2daa71d
commit 4c700da6fa
1 changed files with 29 additions and 0 deletions

29
db/schema.sql Normal file
View File

@ -0,0 +1,29 @@
-- Adminer 4.7.5 SQLite 3 dump
CREATE TABLE "sites" (
"id" integer NOT NULL,
"host" text COLLATE 'NOCASE' NOT NULL,
"label" text NULL,
"stats_public" numeric NOT NULL DEFAULT '0',
"stats_key" text NOT NULL
);
CREATE UNIQUE INDEX "sites_host" ON "sites" ("host");
CREATE TABLE "visits" (
"site_id" integer NOT NULL,
"path" text NOT NULL,
"ts" numeric NOT NULL,
"unique" numeric NOT NULL DEFAULT '0',
"os" text NOT NULL DEFAULT '',
"device" text NOT NULL DEFAULT '',
"browser" text NOT NULL DEFAULT '',
"ref" text NOT NULL DEFAULT '',
"width" integer NOT NULL DEFAULT ''
);
CREATE INDEX "visits_site_id_path" ON "visits" ("site_id", "path");
--