fix(nuxthub): skip build-time dump handoff for local databases - #3823
Open
benjamincanac wants to merge 1 commit into
Open
fix(nuxthub): skip build-time dump handoff for local databases#3823benjamincanac wants to merge 1 commit into
benjamincanac wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
Resolves #3821 (second part, see also nuxt/nuxt.com#2358)
❓ Type of change
📚 Description
Stacked on #3822.
When
applyMigrationsDuringBuildis enabled,setupNitro()hands the content dump to hub's build-time migrations and disables the runtime integrity check, assuming the migrated database is the one the runtime will use. That only holds for remote databases. For a localfile:database the migrated file is discarded with the build machine, so the runtime database starts empty and the disabled integrity check prevents the runtime dump import. Collections come back empty, which is why nuxt.com has to setapplyMigrationsDuringBuild: false.The handoff is now gated on the resolved database being remote (
d1,postgresql, orlibsqlwith a non-file:URL). For localfile:libsql databases the handoff is skipped andintegrityCheckstaystrue, including URLs already onfile:/tmp/which previously skipped the rewrite block and keptintegrityCheck: false, the exact empty-collections trap.Added unit tests covering the skipped handoff for local databases (including the
file:/tmp/case) and the performed handoff with disabled integrity check for a remote database.📝 Checklist