Repository navigation
fix: force database binding in manifest when migrations exist - #66
Conversation
0e073a3 to
cff2533
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cff2533ed5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
cff2533 to
6397c3c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6397c3cb55
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
6397c3c to
a317ee3
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a317ee3abe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
a317ee3 to
aa36642
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa366428fe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
When a user removed D1 usage from source code but left migration files in db/migrations/, deploys failed with "migration failed: no D1 binding found". The migration collection and binding inference systems were independent with no cross-check, producing a manifest with migrations but no database binding. Add hasMigrations to the binding condition in both packageBuild and packageFrameworkBuild so migrations on disk always imply a database binding in the manifest. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
aa36642 to
4533692
Compare

When a user removed D1 usage from source code but left migration files
in db/migrations/, deploys failed with "migration failed: no D1 binding
found". The migration collection and binding inference systems were
independent with no cross-check, producing a manifest with migrations
but no database binding.
Add hasMigrations to the binding condition in both packageBuild and
packageFrameworkBuild so migrations on disk always imply a database
binding in the manifest.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Note
Medium Risk
Changes affect deploy-time provisioning and the generated deploy manifest for database projects, which can impact runtime bindings and migration execution behavior. Test updates reduce CI flakiness but alter how integration coverage is exercised (preview vs dev).
Overview
Fixes deploy/package inconsistencies where
db/migrationscould be uploaded/run without a corresponding DB binding in the manifest.Packaging now treats presence of migrations as implying a database:
packageBuild/packageFrameworkBuildaddd1(SQLite) orhyperdrive(Postgres) bindings whenever migrations are included, and deploy preflight Hyperdrive provisioning is expanded to also trigger when migrations exist (even if binding inference says no DB). Adds a comprehensive unit test suite around migration↔binding consistency, and stabilizes the kitchen-sink integration test by switching fromvite devto a build +vite previewflow and explicitly applying local migrations before browser assertions;waitForServercan now fail fast if the spawned server exits.Written by Cursor Bugbot for commit 4533692. This will update automatically on new commits. Configure here.