hitman/migrations/20240317182405_hits.up.sql
2024-03-30 13:07:56 -07:00

9 lines
314 B
SQL

create table if not exists hits (
id integer primary key,
page text not null, -- the slug from the page
hit_key text not null unique,
viewed timestamp not null default CURRENT_TIMESTAMP
);
create index if not exists hits_page_dex on hits(page);
create index if not exists hits_viewed_dex on hits(viewed);