From 5adc7d788cb07b6395b4b20138d1c17a774e8823 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Tue, 8 Oct 2024 15:59:08 +0100 Subject: [PATCH 1/5] Adding migrations_dir in Wrangler config chapter. --- src/content/docs/workers/wrangler/configuration.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx index a3ad59032aa6a5d..cd9b1b3c8bbe0f1 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -400,6 +400,10 @@ 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. +- `migration_dir` + + - The migration directory containing the `ALTER` table. By default, `wrangler d1 migrations create` creates a folder named `migrations`. You can use `migration_dir` to specify a different folder containing the migration files. For more information, refer to [D1 Wrangler `migration` commands](/workers/wrangler/commands/#migrations-create). + :::note When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production database. Refer to [Local development and testing](/workers/testing/local-development/) for more details. From c359a5947a39bac702729d4a470df9b48253e97c Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Tue, 8 Oct 2024 16:06:42 +0100 Subject: [PATCH 2/5] Correcting description --- 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 cd9b1b3c8bbe0f1..7fa84713c79815b 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -402,7 +402,7 @@ To bind D1 databases to your Worker, assign an array of the below object to the - `migration_dir` - - The migration directory containing the `ALTER` table. By default, `wrangler d1 migrations create` creates a folder named `migrations`. You can use `migration_dir` to specify a different folder containing the migration files. For more information, refer to [D1 Wrangler `migration` commands](/workers/wrangler/commands/#migrations-create). + - The migration directory containing the migration files. By default, `wrangler d1 migrations create` creates a folder named `migrations`. You can use `migration_dir` to specify a different folder containing the migration files. For more information, refer to [D1 Wrangler `migration` commands](/workers/wrangler/commands/#migrations-create) and [D1 migration](/d1/reference/migrations/). :::note From 847ee8e2a8dd1f259bc775ca2aba18a1b3d8b82c Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Tue, 8 Oct 2024 16:08:55 +0100 Subject: [PATCH 3/5] Migration > MigrationS for consistency --- 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 7fa84713c79815b..79da632d45d4631 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -402,7 +402,7 @@ To bind D1 databases to your Worker, assign an array of the below object to the - `migration_dir` - - The migration directory containing the migration files. By default, `wrangler d1 migrations create` creates a folder named `migrations`. You can use `migration_dir` to specify a different folder containing the migration files. For more information, refer to [D1 Wrangler `migration` commands](/workers/wrangler/commands/#migrations-create) and [D1 migration](/d1/reference/migrations/). + - The migration directory containing the migration files. By default, `wrangler d1 migrations create` creates a folder named `migrations`. You can use `migration_dir` to specify a different folder containing the migration files. For more information, refer to [D1 Wrangler `migration` commands](/workers/wrangler/commands/#migrations-create) and [D1 migrations](/d1/reference/migrations/). :::note From 2eea43d124f6d68dbee69baff06aa0149296c96a Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Tue, 8 Oct 2024 16:10:26 +0100 Subject: [PATCH 4/5] Correction on directory name --- src/content/docs/workers/wrangler/configuration.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx index 79da632d45d4631..79b31261327eb23 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -400,9 +400,9 @@ 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. -- `migration_dir` +- `migrations_dir` - - The migration directory containing the migration files. By default, `wrangler d1 migrations create` creates a folder named `migrations`. You can use `migration_dir` to specify a different folder containing the migration files. For more information, refer to [D1 Wrangler `migration` 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 more information, refer to [D1 Wrangler `migration` commands](/workers/wrangler/commands/#migrations-create) and [D1 migrations](/d1/reference/migrations/). :::note From 72798708ff8460481dd9dbadd4a2153c7e05cdfa Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Tue, 8 Oct 2024 16:11:28 +0100 Subject: [PATCH 5/5] Syntax correction for consistency. --- 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 79b31261327eb23..af261290c27b188 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -402,7 +402,7 @@ 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 `migration` 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 more information, refer to [D1 Wrangler `migrations` commands](/workers/wrangler/commands/#migrations-create) and [D1 migrations](/d1/reference/migrations/). :::note