From 92b9da823828a8bcd031873535213d91f83c0f80 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Fri, 29 Nov 2024 13:31:39 +0000 Subject: [PATCH] [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 --- src/content/docs/d1/reference/migrations.mdx | 2 +- src/content/docs/workers/wrangler/configuration.mdx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/content/docs/d1/reference/migrations.mdx b/src/content/docs/d1/reference/migrations.mdx index e43f9bd04ba736..495fbf6b207f10 100644 --- a/src/content/docs/d1/reference/migrations.mdx +++ b/src/content/docs/d1/reference/migrations.mdx @@ -35,7 +35,7 @@ database_name = "" database_id = "" preview_database_id = "" migrations_table = "" # Customize this value to change your applied migrations table name -migrations_dir = "" # Customize this value to rename the `migrations` folder +migrations_dir = "" # Specify your custom migration directory ``` diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx index 10390fecb4fe00..c604993c15861e 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -475,7 +475,8 @@ To bind D1 databases to your Worker, assign an array of the below object to the - `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 more information, refer to [D1 Wrangler `migrations` commands](/workers/wrangler/commands/#migrations-create) and [D1 migrations](/d1/reference/migrations/). + - 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). + - For more information, refer to [D1 Wrangler `migrations` commands](/workers/wrangler/commands/#migrations-create) and [D1 migrations](/d1/reference/migrations/). :::note