Skip to content
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

Merged
merged 3 commits into from
Mar 17, 2024

Conversation

c-ehrlich
Copy link
Member

Closes #1795

βœ… Checklist

  • I have followed every step in the contributing guide (updated 2022-10-06).
  • The PR title follows the convention we established conventional-commit
  • I performed a functional test on my final commit

πŸ’―

Copy link

changeset-bot bot commented Mar 15, 2024

πŸ¦‹ Changeset detected

Latest commit: cef774e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-t3-app Patch

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

Copy link

vercel bot commented Mar 15, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
t3-upgrade βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Mar 17, 2024 0:19am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
create-t3-app ⬜️ Ignored (Inspect) Visit Preview Mar 17, 2024 0:19am

@github-actions github-actions bot added πŸ“Œ area: cli Relates to the CLI πŸ“Œ area: t3-app Relates to the generated T3 App labels Mar 15, 2024
Comment on lines 29 to 37
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";
}
}
Copy link
Member Author

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

Copy link
Contributor

github-actions bot commented Mar 15, 2024

⚑️ Lighthouse report for the changes in this PR:

Category Score
🟒 Performance 94
🟒 Accessibility 91
🟒 Best practices 100
🟒 SEO 100
πŸ”΄ PWA 30

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(),
Copy link
Member

@juliusmarminge juliusmarminge Mar 16, 2024

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

Copy link
Member Author

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?)

Copy link
Member Author

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 :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly planetscale maybe? Their docs suggests it: image image

No need for the ssl query param note then too

@juliusmarminge juliusmarminge added this pull request to the merge queue Mar 17, 2024
Merged via the queue into main with commit 41380d1 Mar 17, 2024
267 checks passed
@juliusmarminge juliusmarminge deleted the db-env-refine branch March 17, 2024 15:25
devvianto605 pushed a commit to devvianto605/create-devviantex-nextjs-app that referenced this pull request Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
πŸ“Œ area: cli Relates to the CLI πŸ“Œ area: t3-app Relates to the generated T3 App
Projects
None yet
2 participants