PGlite
Use PGlite for local development or one process with persistent disk:migrationsFolder: false only when another system owns schema
application.
PostgreSQL
Use PostgreSQL for multiple instances, ephemeral runtimes, managed backups, or established operational tooling:env.HYPERDRIVE.connectionString and set
cache: false; see Cloudflare Workers.
Run PostgreSQL migrations
Run migrations before the new application version accepts traffic:Durable Objects
The SQLite Durable Objects adapter partitions storage by a selected object and applies its schema lazily when the object starts. This adapter is experimental. For production Workers deployments, use PostgreSQL through Hyperdrive.Implement a custom adapter
UsedefineDatabase when your host owns the storage implementation or needs to
resolve a partition at request time:
Database persistence
contract.