saturn
- 187 commits
- 2 branches
- 0 tags
- updated
- CI 2/2
schema.sql
850 B · 28 lines
1-- likes: one row per post2CREATE TABLE IF NOT EXISTS Likes (3 page TEXT PRIMARY KEY,4 count INTEGER NOT NULL DEFAULT 05);67-- who liked what today: a daily-rotating hash, never an ip or email8CREATE TABLE IF NOT EXISTS LikeVoters (9 page TEXT NOT NULL,10 voter TEXT NOT NULL,11 created_at TEXT NOT NULL,12 PRIMARY KEY (page, voter)13);1415-- comments: arrive by email. ones with links are hidden until approved.16-- nothing about the sender is kept, not even a hash of their address17CREATE TABLE IF NOT EXISTS Comments (18 id TEXT PRIMARY KEY,19 page TEXT NOT NULL,20 parent TEXT,21 name TEXT NOT NULL,22 body TEXT NOT NULL,23 is_author INTEGER NOT NULL DEFAULT 0,24 approved INTEGER NOT NULL DEFAULT 0,25 created_at TEXT NOT NULL26);2728CREATE INDEX IF NOT EXISTS idx_comments_page ON Comments (page, approved, created_at);