Intelligence, Advanced Charting & Trading Platform

1 # ADR-0002: PostgreSQL Provider Portability
2
3 Status: Accepted
4 Date: 2026-10-05
5
6 ## Decision
7 VELYQOR's canonical database technology is PostgreSQL. Hosting provider identity is infrastructure configuration, not a domain dependency.
8
9 The application consumes a standard `DATABASE_URL`. Schema migrations must use portable PostgreSQL features unless an extension is separately approved by ADR. Provider SDKs must not leak into market-domain modules.
10
11 The initial managed provider may be Neon. Supabase, self-hosted PostgreSQL, or another compatible managed service can replace it without redesigning the market domain.
12
13 Cloudflare Hyperdrive may pool/accelerate PostgreSQL connections after a database exists; Hyperdrive is not the datastore itself.
14
15 ## Consequences
16 - No Supabase-specific schema requirement.
17 - Auth is decoupled from core market data.
18 - Database migrations live in `db/migrations`.
19 - Secrets are supplied by runtime configuration and never committed.
20 - Provider migration remains operational rather than architectural work.