Storage Overview
Choose a database, focused Drizzle stores, and a migration path for effect-auth.
Storage is durable authentication state. There is no generic Storage service: features depend on focused Effect service contracts, and applications compose only the implementations their program requires.
Current support
First-party durable direct Drizzle support covers all 42 ports tracked in the project plan for SQLite, D1, and PostgreSQL. Full storage Layers compose those focused adapters over one application-owned database service. Nine-port account/password compositions remain available for applications with a deliberately smaller schema.
The schema generator and migration streams continue to cover every feature and table. Generated Drizzle declarations describe DDL; they do not imply runtime parity for application-defined extensions.
| Database | Current path |
|---|---|
| Cloudflare D1 | Full or selective direct storage over one D1 database service |
| SQLite | Full or selective direct storage over one Bun/Node database service |
| PostgreSQL | Full or selective direct storage over one PostgreSQL database service |
| Custom database | Implement every store required by the composed program |
Use the current Drizzle*AuthStorageLayer compositions, or compose focused store Layers when the application intentionally installs a subset. Deleted Effect-QB compatibility Layers remain unsupported.
Migrations
| Database state | Action |
|---|---|
| New and empty | Generate a selective baseline through the Schema Generator API |
| Existing with an effect-auth ledger | Apply only reviewed unapplied upgrade migrations in order |
| Incompatible earlier alpha | Compare schemas; reset non-production data or design a reviewed one-off migration |
Never apply a fresh baseline as an upgrade. Drizzle declarations and drizzle-kit push do not replace effect-auth migration SQL.
Correctness boundary
An application-owned adapter must preserve typed failures, eligibility rules, ordering, limits, and atomic consume/claim/rotation/CAS behavior. Run integration and concurrency tests against the production engine and transaction mode. Memory storage is suitable for tests only, not production durability.