Start with the runtime, not a copied connection string
Drizzle’s Supabase guide confirms that the ORM can connect to a Supabase Postgres database. The connection mode depends on where the code runs. A string copied from a tutorial may point at the wrong endpoint or assume network support your host does not have.
Use the selector below to locate the relevant documentation. It does not inspect your project or validate credentials.
Local planning helper
Find the documented connection route
Choose an environment to see its documented route and checks.
Keep the server and browser paths separate
For browser access, Supabase’s Data API and client libraries use the project URL and an appropriate API key rather than a database password. Row Level Security policies govern that access. Never place a privileged connection string or administrative secret in browser code.
For server-side Drizzle, take the endpoint from the project’s Connect panel. Confirm its port, username, network support and pool mode. Keep credentials in approved server-side secret storage.
Check pooling and migrations separately
Supabase documents transaction pooling for short-lived functions and a direct route for migration, backup and restore tools. Drizzle’s Postgres.js transaction-pooling example uses prepare: false. Session features and prepared statements cannot simply be assumed to carry over between modes.
A connection that works for one query does not prove a migration, rollback or access policy works. Keep those as separate checks.
A checklist before live data
- Record driver version, runtime and the selected connection mode.
- Check network support from the actual host.
- Use synthetic rows to test the intended read/write path.
- Test allowed and denied access through the real application path.
- Inspect a schema change on a disposable database, then rehearse rollback.
- Record the result and unresolved limits before enabling live traffic.
These steps are proposed. The selector was tested locally; no live Supabase database, provider account or migration was executed for this article.