Repository navigation
fix(d1): reject migration names that Windows cannot store - #411
Conversation
A `:` in the name made NTFS write the SQL into an alternate data stream, so the migration was silently skipped. The other reserved characters failed with a raw ENOENT. Fixes cloudflare#410
|
Hi @Cherry. Thanks for contributing to During the open beta, we’re being very intentional about the changes we accept so that we can prioritise stability for GA. We’re limiting pull requests to contributions coordinated with the team in advance, so this PR has been automatically closed. We’d still love to hear about your use case, so please make sure it’s captured in a |
|
✅ Approved — This is a small, well-tested fix that rejects Windows-reserved characters before anything is written to disk, and no issues were found in the code, tests or changeset. The decision is advisory: this comment never approves, blocks or requests changes on the pull request. ✅ All checks passed📋 Code Quality: ✅ LGTMThe new reserved-character check in 📝 Documentation: ✅ LGTMThe changeset follows the repository's format: Reviewed commit: |
|
clanker review |
commit: |
Fixes #410
cf d1 migrations createnow rejects names containing: * ? " < > |, the same way it already rejects/and\.On Windows, a
:in the name made NTFS write the SQL into an alternate data stream of an empty file (0001_usersinstead of0001_users:_add_email.sql). The command reported success,applynever picked the file up, and the next migration reused the same number. The other characters failed with a raw ENOENT.The check runs on every platform, since migrations are committed and a name that works on Linux or macOS would still break a Windows checkout.
create.test.ts