- Symptom
- SQL code did not contain a statementMigration file runs fine in sqlite3 locallyRemoving the trailing commented SQL makes it pass
- Cause
- Older Wrangler split SQL files on every semicolon, including ones inside comments, which produced an empty statement. Wrangler 3.109.3 made the splitter skip comments.
- Fix
- Upgrade Wrangler to 3.109.3 or later, or remove semicolons from comments in migration files.
- Apply
npm i -D wrangler@latest npx wrangler d1 migrations apply DB --remote- Affected
- Wrangler before 3.109.3 (fix merged 2025-02-20)
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders