---
title: D1 migrations support nested layouts via `migrations_pattern`
description: Configure `wrangler d1 migrations apply` to discover migrations in nested layouts produced by ORMs like Drizzle.
image: https://edgetunnel-b2h.pages.dev/changelog-preview.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://edgetunnel-b2h.pages.dev/changelog/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://edgetunnel-b2h.pages.dev/changelog/rss/index.xml) [ View RSS feeds ](https://edgetunnel-b2h.pages.dev/fundamentals/new-features/available-rss-feeds/) 

![hero image](https://edgetunnel-b2h.pages.dev/_astro/hero.CVYJHPAd_26AMqX.svg) 

[ ← Back to all posts ](https://edgetunnel-b2h.pages.dev/changelog/) 

## D1 migrations support nested layouts via \`migrations\_pattern\`

May 29, 2026 

[ D1 ](https://edgetunnel-b2h.pages.dev/d1/) 

You can now point `wrangler d1 migrations apply` at a nested migrations layout — such as the one produced by [Drizzle ↗](https://orm.drizzle.team/) (`migrations/0001_init/migration.sql`) — using the new `migrations_pattern` D1 binding config:

**JSONC**

```jsonc
{
  "d1_databases": [
    {
      "binding": "DB",
      "database_name": "my-database",
      "database_id": "<UUID>",
      "migrations_dir": "migrations",
      "migrations_pattern": "migrations/*/migration.sql",
    },
  ],
}
```

`migrations_pattern` is a glob (relative to your Wrangler config file) used to discover migration files. It defaults to `${migrations_dir}/*.sql`, so existing projects keep working unchanged. Each migration's name is recorded in the migrations table as a path relative to `migrations_dir`.

To learn more, visit D1's [migrations documentation](https://edgetunnel-b2h.pages.dev/d1/reference/migrations/#nested-migration-layouts).

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://edgetunnel-b2h.pages.dev/changelog/post/2026-06-04-migrations-pattern/#page","headline":"D1 migrations support nested layouts via `migrations_pattern` · Changelog","description":"Configure wrangler d1 migrations apply to discover migrations in nested layouts produced by ORMs like Drizzle.","url":"https://edgetunnel-b2h.pages.dev/changelog/post/2026-06-04-migrations-pattern/","inLanguage":"en","image":"https://edgetunnel-b2h.pages.dev/changelog-preview.png","dateModified":"2026-05-29","datePublished":"2026-05-29","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://edgetunnel-b2h.pages.dev/#website","name":"Cloudflare Docs","url":"https://edgetunnel-b2h.pages.dev/"}}
```
