The original stored everything in hosted Postgres. We converted the schema to SQLite for Cloudflare D1, so JSON columns, arrays, timestamps and auto-increment ids all map cleanly, and replaced interactive transactions, which D1 doesn't support, with ordered writes that never leave orphaned records.