fix: add migrations directory to D1 + Drizzle template to prevent ENOENT on dev#1000
Open
shkumbinhasani wants to merge 1 commit intoAmanVarshney01:mainfrom
Open
fix: add migrations directory to D1 + Drizzle template to prevent ENOENT on dev#1000shkumbinhasani wants to merge 1 commit intoAmanVarshney01:mainfrom
shkumbinhasani wants to merge 1 commit intoAmanVarshney01:mainfrom
Conversation
…ENT on dev The drizzle config specifies out: "./src/migrations" but that directory is never created during scaffolding. When Alchemy's D1Database globs for SQL files in the non-existent directory, Bun's fs.glob throws ENOENT. Adding .gitkeep ensures the directory exists after project creation so `bun run dev` works before the user runs `db:generate`. Closes AmanVarshney01#999
|
@shkumbinhasani is attempting to deploy a commit to the Better T Stack Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
migrations/.gitkeepto the db package template sopackages/db/src/migrationsexists after scaffoldingbun run devwith D1 + Drizzle + Alchemy setupCloses #999
Problem
Bun's
fs.globthrows ENOENT when the target directory doesn't exist (unlike Node.js which returns empty). Alchemy'sD1Databaseglobs for*.sqlfiles in the migrations directory, which crashes before the user has a chance to rundb:generate.Test plan
bun run devimmediately — should no longer crash