From 3fba514e404312f03a14404ae1d4f16f2d38ed9c Mon Sep 17 00:00:00 2001 From: Florent Collin Date: Wed, 5 Aug 2026 18:32:21 +0100 Subject: [PATCH 1/2] [D1] Correct preview database binding docs --- src/content/docs/workers/wrangler/configuration.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx index 077a878c83d..62131cc3459 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -567,7 +567,7 @@ To bind D1 databases to your Worker, assign an array of the below object to the - The ID of the database. The database ID is available when you first use `wrangler d1 create` or when you call `wrangler d1 list`, and uniquely identifies your database. - `preview_database_id` - - The preview ID of this D1 database. If provided, `wrangler dev` uses this ID. Otherwise, it uses `database_id`. This option is required when using `wrangler dev --remote`. + - The preview ID of this D1 database. If provided, `wrangler dev` uses this ID. Otherwise, it uses `database_id`. - `migrations_dir` - The migration directory containing the migration files. By default, `wrangler d1 migrations create` creates a folder named `migrations`. You can use `migrations_dir` to specify a different folder containing the migration files (for example, if you have a mono-repo setup, and want to use a single D1 instance across your apps/packages). From c67082f8d7ffb4efcfdd36cf63e747c5550eef15 Mon Sep 17 00:00:00 2001 From: Florent Collin Date: Wed, 5 Aug 2026 18:34:30 +0100 Subject: [PATCH 2/2] [D1] Recommend preview database for remote dev --- src/content/docs/workers/wrangler/configuration.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx index 62131cc3459..0fe3b3a0e76 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -567,7 +567,7 @@ To bind D1 databases to your Worker, assign an array of the below object to the - The ID of the database. The database ID is available when you first use `wrangler d1 create` or when you call `wrangler d1 list`, and uniquely identifies your database. - `preview_database_id` - - The preview ID of this D1 database. If provided, `wrangler dev` uses this ID. Otherwise, it uses `database_id`. + - The preview ID of this D1 database. If provided, `wrangler dev` uses this ID. Otherwise, it uses `database_id`. This option is recommended when using `wrangler dev --remote` to avoid using your production database. - `migrations_dir` - The migration directory containing the migration files. By default, `wrangler d1 migrations create` creates a folder named `migrations`. You can use `migrations_dir` to specify a different folder containing the migration files (for example, if you have a mono-repo setup, and want to use a single D1 instance across your apps/packages).