-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: non planetscale env.js refers to YOUR_MYSQL_URL_HERE #1802
Conversation
π¦ Changeset detectedLatest commit: cef774e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git βοΈ
1 Ignored Deployment
|
cli/src/installers/envVars.ts
Outdated
if (usingDb) { | ||
if (usingPlanetScale) { | ||
if (usingAuth) envFile = "with-auth-db-planetscale.js"; | ||
else envFile = "with-db-planetscale.js"; | ||
} else { | ||
if (usingAuth) envFile = "with-auth-db.js"; | ||
else envFile = "with-db.js"; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont love this, feel free to suggest something easier to read
β‘οΈ Lighthouse report for the changes in this PR:
Lighthouse ran on https://create-t3-app-git-db-env-refine-t3-oss.vercel.app/ |
* isn't built with invalid env vars. | ||
*/ | ||
server: { | ||
DATABASE_URL: z.string().url(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bit unrelated, but what's your thought on swapping out the url for host, username and password? I tend to prefer that as it's easier to switch between different users but idk if it's just me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just for planetscale or also for other DBs where this can be possible (i think everything except sqlite?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally if im swapping locally i usually just keep two connection strings in my env file and comment one out. i don't think i would find it more convenient, but not less convenient either. maybe worse for DB providers that only give connection strings so users would have to extract host/user/pw?
dont feel strongly either way, feel free to make the change if you think it's better :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closes #1795
β Checklist
π―