-
Notifications
You must be signed in to change notification settings - Fork 10k
Open
Labels
content:newRequest for new/missing contentRequest for new/missing contentdocumentationDocumentation editsDocumentation editsproduct:workersRelated to Workers productRelated to Workers product
Description
Proposed changes
- https://developers.cloudflare.com/workers/configuration/previews/
- https://developers.cloudflare.com/workers/static-assets/migration-guides/migrate-from-pages/
Please add a short section to the Previews docs that answers:
- Can a Worker that was migrated from Pages point at a different D1 database for its
*.workers.devpreview URL?- If yes, document the two recommended approaches (e.g.
preview_database_idvs. an explicit[env.preview]block). - Show a minimal
wrangler.toml/wrangler.jsoncsnippet for each.
- If yes, document the two recommended approaches (e.g.
- Explain how this differs from the behaviour Pages had with preview deployments.
- Mention any “gotchas” (for example:
wrangler dev --remoteusespreview_database_id;wrangler deployalways uses the section you deploy).
This would save users from hunting through Discord / blog posts when they are simply trying to keep production and preview data separate.
Subject Matter
D1 + Workers configuration – preview-time database binding
Content Location
Primary:
https://developers.cloudflare.com/workers/configuration/previews/
Also reference:
https://developers.cloudflare.com/workers/static-assets/migration-guides/migrate-from-pages/
(in the D1 section of the migration guide)
Additional information
No response
chkilel and yanthomasdev
Metadata
Metadata
Labels
content:newRequest for new/missing contentRequest for new/missing contentdocumentationDocumentation editsDocumentation editsproduct:workersRelated to Workers productRelated to Workers product