deploy
This commit is contained in:
16
db/migrations/001_init.sql
Normal file
16
db/migrations/001_init.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE IF NOT EXISTS robertseares_page_loads (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
path TEXT NOT NULL,
|
||||
locale TEXT,
|
||||
referrer TEXT,
|
||||
user_agent TEXT,
|
||||
viewport JSONB NOT NULL DEFAULT '{}'::jsonb,
|
||||
metadata JSONB NOT NULL DEFAULT '{}'::jsonb,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS robertseares_page_loads_created_at_idx
|
||||
ON robertseares_page_loads (created_at DESC);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS robertseares_page_loads_path_created_at_idx
|
||||
ON robertseares_page_loads (path, created_at DESC);
|
||||
Reference in New Issue
Block a user