Skip to content

[D1] Document migrations_pattern config option#31140

Open
alsuren wants to merge 1 commit into
productionfrom
dlaban/CFSQL-1589-d1-migrations-pattern
Open

[D1] Document migrations_pattern config option#31140
alsuren wants to merge 1 commit into
productionfrom
dlaban/CFSQL-1589-d1-migrations-pattern

Conversation

@alsuren
Copy link
Copy Markdown
Collaborator

@alsuren alsuren commented May 29, 2026

Summary

Adds documentation for the new migrations_pattern D1 binding config field landing in wrangler PR
cloudflare/workers-sdk#14089.

Updates:

  • d1/reference/migrations.mdx \u2014 migrations_pattern shown in the example config, plus a new "Nested migration layouts" section that explains the default behaviour, shows the Drizzle-style nested example, lists the rules (migrations_dir required, pattern must start with ${migrations_dir}/, recorded names are relative to migrations_dir), and notes that wrangler d1 migrations create only writes top-level files so ORM users should use their ORM's generate command.

  • workers/wrangler/configuration.mdx \u2014 migrations_pattern bullet next to the existing migrations_dir bullet in the D1 bindings reference.

  • changelog entry

Documentation checklist

  • Is there a changelog entry
    • change the date on the changelog entry to whenever we release the wrangler PR? Or do we want to just rely on the wrangler changelog instead
  • The change adheres to the documentation style guide.
    • Opencode assures me it does. I'm afraid this whole PR is pure slop, but it's correct from my reading of it. Feel free to tweak.

Adds documentation for the new `migrations_pattern` D1 binding
config field landing in wrangler PR
cloudflare/workers-sdk#14089.

Updates:

  - `d1/reference/migrations.mdx` \u2014 `migrations_pattern` shown
    in the example config, plus a new "Nested migration layouts"
    section that explains the default behaviour, shows the
    Drizzle-style nested example, lists the rules (`migrations_dir`
    required, pattern must start with `${migrations_dir}/`,
    recorded names are relative to `migrations_dir`), and notes
    that `wrangler d1 migrations create` only writes top-level
    files so ORM users should use their ORM's generate command.

  - `workers/wrangler/configuration.mdx` \u2014 `migrations_pattern`
    bullet next to the existing `migrations_dir` bullet in the D1
    bindings reference.
@github-actions github-actions Bot added product:workers Related to Workers product product:d1 D1: https://developers.cloudflare.com/d1/ product:changelog size/s labels May 29, 2026
@cloudflare-docs-bot
Copy link
Copy Markdown

cloudflare-docs-bot Bot commented May 29, 2026

Review

⚠️ 1 warning found in commit 7ccc73b.

Warnings (1)
File Issue
d1/reference/migrations.mdx line 87 Directional words — Line uses directional word above Fix: Replace with a direct reference by name or link, for example as with the Drizzle layout in the previous example
Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/product-owners
/src/content/docs/d1/ @elithrar, @rita3ko, @irvinebroque, @vy-ton, @ivoryibu, @rts-rob, @joshthoward, @lambrospetrou, @oxyjun, @cloudflare/product-owners
/src/content/docs/workers/wrangler/ @cloudflare/wrangler, @irvinebroque, @cloudflare/product-owners, @MattieTK, @vy-ton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:changelog product:d1 D1: https://developers.cloudflare.com/d1/ product:workers Related to Workers product size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.