- Managed Postgres — injected as a connection string. Use any Postgres client. This is the default and matches the platform’s tenancy model of one Postgres database per organization.
- D1 — a SQLite database accessed through a Worker binding, the same way as storage.
Two command groups touch “the database” and do different things.
voyant databases (this page) provisions and manages the managed Cloud database. voyant db runs Drizzle Kit against your project schema — generate, migrate, studio, push. You provision with the former and apply migrations with the latter.Provisioning
A database is created when you create an app, but you can manage them directly:Neon Postgres
When your app is deployed, Cloud injects aDATABASE_URL environment variable with a managed, pooled connection string. It is marked secret and is available to both the Worker and Node runtimes, so your code reads it the same way everywhere:
DATABASE_URL for application traffic. A direct (non-pooled) string is also injected as DATABASE_URL_DIRECT for the Node execution lane only — reach for it from tools that need a single long-lived session, such as certain migration or introspection tools. It is never shipped to the Worker runtime.
Branches and connection strings
Managed Postgres supports branches, useful for previews and migrations:Cloudflare D1
D1 is provisioned with--kind d1 and accessed through a Worker binding rather than a connection string. Declare the binding in your wrangler.jsonc; the deploy resolves it to your provisioned database:
my-db → MY_DB).
Migrations
For Postgres, migrations are part of your app, not a Cloud step you run by hand. Author them against your schema with Drizzle Kit and the deploy applies them:Next steps
Storage
Object storage (R2) and key-value (KV).
CLI commands
Every
databases and db subcommand and flag.