The two types SQLite doesn't have
SQLite has no native DATE/DATETIME type and no native BOOLEAN. Both are conventions over the existing types. There are three viable approaches for dates:
- ISO 8601 TEXT —
'2026-05-03 12:00:00'. Human-readable, sorts correctly as text, supported by all SQLite date functions. Recommended default. - Unix epoch INTEGER — seconds since 1970. Compact, fast to compare, easy in any language. Use when you need numeric range filtering at scale.
- Julian Day REAL — astronomical convention. Pretty much never the right choice for application code.
For booleans, SQLite stores 0/1 as integers and accepts the literals TRUE and FALSE (which compile to 1 and 0). You'll see this everywhere: archived INTEGER NOT NULL DEFAULT 0.
Tip: Pippa's
conversations table uses ISO 8601 text for created_at / updated_at because the JSONL ground truth is also ISO 8601. The two stay byte-comparable, which makes purge-and-replay reconstruction simple.