Skip to content

Commit 22ebcc7

Browse files
committed
fix: Cloudflare deploy docs with D1.
1 parent 8ef59b4 commit 22ebcc7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎docs/integrations/cloudflare.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ Create `wrangler.jsonc` in your project root with the resource IDs from step 1:
244244
"binding": "DB",
245245
"database_name": "my-app-db",
246246
"database_id": "<your-database-id>",
247+
"migrations_dir": "./db/migrations",
247248
},
248249
],
249250
"kv_namespaces": [
@@ -268,10 +269,10 @@ Only include the bindings your app actually uses. You can also add service bindi
268269
If your app uses D1, apply migrations before deploying:
269270

270271
```bash
271-
wrangler d1 migrations apply DB --remote
272+
wrangler d1 migrations apply my-app-db --remote
272273
```
273274

274-
This uses the same `db/migrations/` directory that Void uses locally.
275+
This uses the same `db/migrations/` directory that Void uses locally. `my-app-db` is the database name from your `wrangler.jsonc`; using the database name avoids accidentally applying migrations to the wrong binding.
275276

276277
### 4. Build and deploy
277278

0 commit comments

Comments
 (0)