Skip to content

Commit

Permalink
[D1] Clarify sharing D1 across products locally (#18475)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Oxyjun authored Nov 29, 2024
1 parent c39fd2c commit 92b9da8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/content/docs/d1/reference/migrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ database_name = "<DATABASE_NAME>"
database_id = "<UUID>"
preview_database_id = "<UUID>"
migrations_table = "<d1_migrations>" # Customize this value to change your applied migrations table name
migrations_dir = "<FOLDER_NAME>" # Customize this value to rename the `migrations` folder
migrations_dir = "<FOLDER_NAME>" # Specify your custom migration directory
```

</WranglerConfig>
Expand Down
3 changes: 2 additions & 1 deletion src/content/docs/workers/wrangler/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@ To bind D1 databases to your Worker, assign an array of the below object to the

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

- 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

Expand Down

0 comments on commit 92b9da8

Please sign in to comment.