schema.sql

← Back to explorer
utils/schema.sql
         CREATE TABLE IF NOT EXISTS keystrokes (
             id SERIAL PRIMARY KEY,
             timestamp TIMESTAMP NOT NULL
         );

         CREATE TABLE IF NOT EXISTS hourly_summary (
             hour_key VARCHAR PRIMARY KEY,w
             count INTEGER,
             updated_at TIMESTAMP
         );

         CREATE TABLE IF NOT EXISTS daily_summary (
             id SERIAL PRIMARY KEY,
             first_recorded TIMESTAMP,
             last_updated TIMESTAMP,
             total_keystrokes_last_24h INTEGER
         );