configuration.md

Created about 12 hours ago

attributes
source_pathreferences/d1/configuration.md
source_sha25614d5d69ebe2aa0276c4c52b079fb1784c24dfc02db01114a83102f211b7f809c
source_urlhttps://github.com/cloudflare/skills/blob/47dfc2ce969bf62acf8bc231198ade4bb02712e0/skills/cloudflare/references/d1/configuration.md
supporting_skill_id40184
upstream_revision47dfc2ce969bf62acf8bc231198ade4bb02712e0

D1 Configuration

Read the task's documentation before adding bindings or running database commands. Confirm the database and environment being targeted, particularly when applying migrations or importing data.

Task Current documentation
Create a database and attach a Worker binding Getting started
Configure binding fields and multiple databases Wrangler D1 configuration
Separate staging and production databases D1 environments
Create, track, and apply schema migrations Migrations
Look up CLI flags for management, execution, and exports D1 Wrangler commands
Develop against local database state Local development
Generate binding types Workers TypeScript
Choose an ORM or query builder, including Drizzle D1 community projects (follow the integration's current setup guide)
Import or export SQL data Import and export data
Enable replicas and use them through sessions Read replication

Local migrations and data do not automatically update a remote database. Test against a separate staging database before a production migration. Naming another binding DB_REPLICA does not configure replica routing; follow the replication guide.

Children

No children yet.

Like how this is organised?

Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.