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

generate db config with all clients #14233

Conversation

Elhebert
Copy link
Contributor

What does it do?

It update the project generator to generator a database configuration that relies on env variables for the database selection.

With theses changes Strapi will support database connection strings using the DATABASE_URL env variable.

Why is it needed?

This will unlock the possibility to chose your DB client on each environment without having to adapt your config/database.js

How to test it?

  • Generate a new Strapi project and look at the .env and config/database.{js|ts}.
  • The e2e tests should still pass as they also rely on the project generation to create a new Strapi project.

Related issue(s)/PR(s)

Let us know if this is related to any issue/pull request

@Elhebert Elhebert added pr: feature This PR adds a new feature flag: documentation This PR requires a documentation update labels Aug 26, 2022
@codecov
Copy link

codecov bot commented Aug 26, 2022

Codecov Report

Base: 55.46% // Head: 55.46% // No change to project coverage 👍

Coverage data is based on head (cb215e1) compared to base (414a0fe).
Patch has no changes to coverable lines.

Additional details and impacted files
@@                     Coverage Diff                     @@
##           features/db-config-env-var   #14233   +/-   ##
===========================================================
  Coverage                       55.46%   55.46%           
===========================================================
  Files                            1274     1274           
  Lines                           31847    31847           
  Branches                         5745     5745           
===========================================================
  Hits                            17664    17664           
  Misses                          12364    12364           
  Partials                         1819     1819           
Flag Coverage Δ
front 57.97% <ø> (ø)
unit 49.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Elhebert Elhebert marked this pull request as ready for review September 8, 2022 06:23
Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

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

Didn't you want to add pool config in there?

@alexandrebodin alexandrebodin added this to the 4.4.0 milestone Sep 8, 2022
@alexandrebodin alexandrebodin requested review from Marc-Roig and removed request for derrickmehaffy, petersg83 and Convly September 20, 2022 12:43
@alexandrebodin alexandrebodin added the source: core:database Source is core/database package label Sep 20, 2022
@Convly Convly modified the milestones: 4.4.0, 4.4.1, 4.4.2 Sep 28, 2022
@Convly Convly removed this from the 4.4.2 milestone Oct 5, 2022
@Convly Convly modified the milestones: 4.4.3, 4.4.4 Oct 5, 2022
@Convly Convly modified the milestones: 4.4.4, 4.4.5, 4.4.6 Oct 19, 2022
@Convly Convly modified the milestones: 4.4.6, 4.4.7 Nov 2, 2022
@Convly Convly modified the milestones: 4.5.1, 4.5.2 Nov 16, 2022
@alexandrebodin alexandrebodin removed this from the 4.5.2 milestone Nov 22, 2022
@alexandrebodin alexandrebodin removed the flag: documentation This PR requires a documentation update label Nov 23, 2022
@alexandrebodin
Copy link
Member

@StrapiShaun All good on the doc side we can merge ?

@stb13579
Copy link
Contributor

@StrapiShaun All good on the doc side we can merge ?

Yes. Will it be released next week or today?

@alexandrebodin
Copy link
Member

The next release will be next week :) @Marc-Roig If that's good for you then you can merge whenever

@alexandrebodin alexandrebodin added this to the 4.5.3 milestone Nov 23, 2022
@Marc-Roig
Copy link
Contributor

Marc-Roig commented Nov 23, 2022

That is good for me 🆗 . We have the documentation branch to merge too strapi/documentation#1212

Copy link
Member

@derrickmehaffy derrickmehaffy left a comment

Choose a reason for hiding this comment

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

Lgtm

@Marc-Roig Marc-Roig merged commit 9b75c99 into features/db-config-env-var Nov 29, 2022
@petersg83 petersg83 deleted the db-config-env-var/update-create-project-generator branch November 30, 2022 08:49
@pwizla pwizla added the flag: documentation This PR requires a documentation update label Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: documentation This PR requires a documentation update pr: feature This PR adds a new feature source: core:database Source is core/database package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants