fix: use placeholder database_id in templates for local dev

Miniflare asserts database_id is truthy. An empty string crashes
on startup. Use 'local' as a placeholder -- miniflare doesn't
validate it for local dev, and the comment tells users to replace
it with a real ID for deploy.
This commit is contained in:
Matt Kane
2026-04-01 12:39:34 +01:00
parent cb7a816675
commit 086647bff4
4 changed files with 8 additions and 8 deletions

View File

@@ -10,8 +10,8 @@
{ {
"binding": "DB", "binding": "DB",
"database_name": "my-emdash-site", "database_name": "my-emdash-site",
// Run `wrangler d1 create my-emdash-site` and paste the ID here // Run `wrangler d1 create my-emdash-site` and paste the real ID here for deploy
"database_id": "", "database_id": "local",
}, },
], ],
"r2_buckets": [ "r2_buckets": [

View File

@@ -10,8 +10,8 @@
{ {
"binding": "DB", "binding": "DB",
"database_name": "my-marketing-site", "database_name": "my-marketing-site",
// Run `wrangler d1 create my-marketing-site` and paste the ID here // Run `wrangler d1 create my-marketing-site` and paste the real ID here for deploy
"database_id": "", "database_id": "local",
}, },
], ],
"r2_buckets": [ "r2_buckets": [

View File

@@ -10,8 +10,8 @@
{ {
"binding": "DB", "binding": "DB",
"database_name": "my-portfolio-site", "database_name": "my-portfolio-site",
// Run `wrangler d1 create my-portfolio-site` and paste the ID here // Run `wrangler d1 create my-portfolio-site` and paste the real ID here for deploy
"database_id": "", "database_id": "local",
}, },
], ],
"r2_buckets": [ "r2_buckets": [

View File

@@ -10,8 +10,8 @@
{ {
"binding": "DB", "binding": "DB",
"database_name": "my-emdash-site", "database_name": "my-emdash-site",
// Run `wrangler d1 create my-emdash-site` and paste the ID here // Run `wrangler d1 create my-emdash-site` and paste the real ID here for deploy
"database_id": "", "database_id": "local",
}, },
], ],
"r2_buckets": [ "r2_buckets": [