2 Commits
Author SHA1 Message Date
davidandClaude Opus 5.5 1b2947de7c Phase 9, part 2: one database layer for SQLite and Postgres
db.DB wraps database/sql for either database. The SQL stays SQLite's: on
Postgres each statement's ? become $n and LIKE ignores case as SQLite's
does, and the Postgres schema (postgres.sql, schema 29 as a whole) adds
SQLite's instr, json_extract and two-argument max/min, and a nocase ICU
collation. Needs Postgres 18.

LastInsertId became db.Insert (RETURNING id), INSERT OR IGNORE became ON
CONFLICT DO NOTHING, upserts qualify their columns, and three queries
group by every column they use. SUPERMARKET_TEST_POSTGRES runs the test
suite on Postgres, a new schema per test; all tests pass on both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 07:10:44 -07:00
davidandClaude Opus 5.5 392980aff6 Phase 8 part 1: links that bring visitors
The daily Plausible import also reads the visitors by referring site,
linking page and entry page, with their sign-ups and leads (a new
referrer_days table). Search engines, social networks, AI assistants,
email and mail filters, work apps, the company's own sites and tagged
links are told apart from links on other sites. SEO → Links lists the
sites that sent visitors in 90 days, the pages they landed on and the
sign-ups they brought, new ones first. A linking page Plausible names
in full is kept as a known backlink (a new backlinks table, for parts 2
and 3); browsers mostly send only the site, so most aren't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:23:47 -07:00