ADR-007: PostgreSQL only
Status: accepted 6 September 2026; amended 4 October 2026 (CI follows production’s version).
Context
Section titled “Context”Tests ran on SQLite while production targeted PostgreSQL. Engine differences hid bugs: case-sensitive LIKE, decimals returned as strings, and locking semantics that Stage 2 depends on.
Decision
Section titled “Decision”PostgreSQL 18 everywhere. The committed .env.testing points at a dedicated test database, parallel workers get one database each, and CI runs a postgres:18 service. SQLite support was removed.
Consequences
Section titled “Consequences”- Tests exercise the behaviour production will show, including the row locking Stage 2 needs for reservations.
- Prices arrive in the front end as strings and are coerced at the boundary.
- Local setup requires a running PostgreSQL; Herd provides one.
Amendment, 4 October 2026: CI runs production’s version
Section titled “Amendment, 4 October 2026: CI runs production’s version”The restore drill for Stage 3 follow-up S2-F06 found that production runs PostgreSQL 17.6. That instance is shared by every site on the Forge server, so it is not upgraded for Flowery alone. Nothing had tested on 17: CI and development both ran 18.
CI’s service now uses postgres:17, so the merge gate runs the version production runs. Local development and scripts/check-all stay on Herd’s 18, so every change is still exercised on both versions. A production upgrade to 18 can bring CI back to 18 in the same change.