Skip to content

Search the guides, deployment pages, and API reference.

@pitlane/data-table-d1/migrations

Compiles data-table migrations into the flat .sql files Wrangler's D1 migration runner reads.

Node-only build tooling. Nothing here belongs in a Worker bundle, which is why it is a separate entry point from the driver.

See

Cloudflare D1 guide: Migrations

Interfaces

Functions

  • generateD1Migrations. Writes one <id>_<name>.sql per migration into options.to, then deletes generated files with no migration behind them, so the output directory is a pure function of the input one.