Skip to content

Commit 92b9da8

Browse files
authored
[D1] Clarify sharing D1 across products locally (#18475)
* Adding a line to explain where a user can specify their custom migration dir. * Adding a sentence on the use-case of migrations_dir. * Update src/content/docs/workers/wrangler/configuration.mdx
1 parent c39fd2c commit 92b9da8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/content/docs/d1/reference/migrations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ database_name = "<DATABASE_NAME>"
3535
database_id = "<UUID>"
3636
preview_database_id = "<UUID>"
3737
migrations_table = "<d1_migrations>" # Customize this value to change your applied migrations table name
38-
migrations_dir = "<FOLDER_NAME>" # Customize this value to rename the `migrations` folder
38+
migrations_dir = "<FOLDER_NAME>" # Specify your custom migration directory
3939
```
4040

4141
</WranglerConfig>

src/content/docs/workers/wrangler/configuration.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,8 @@ To bind D1 databases to your Worker, assign an array of the below object to the
475475

476476
- `migrations_dir` <Type text="string" /> <MetaInfo text="optional" />
477477

478-
- 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 more information, refer to [D1 Wrangler `migrations` commands](/workers/wrangler/commands/#migrations-create) and [D1 migrations](/d1/reference/migrations/).
478+
- 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).
479+
- For more information, refer to [D1 Wrangler `migrations` commands](/workers/wrangler/commands/#migrations-create) and [D1 migrations](/d1/reference/migrations/).
479480

480481
:::note
481482

0 commit comments

Comments
 (0)