fix(constructor): set the username, the password and the database via constructor options - #9517
Merged
sushantdhiman merged 1 commit intoJun 12, 2018
Conversation
| @@ -200,9 +200,9 @@ class Sequelize { | |||
| } | |||
Contributor
There was a problem hiding this comment.
Line 198, which looks like a complex empty check can be removed now, just having this should work
password: config.password || this.options.password || null
Contributor
Author
There was a problem hiding this comment.
I removed the empty check of the password.
… constructor options
ducky-hong
force-pushed
the
fix-constructor-options
branch
from
June 8, 2018 14:10
ae96e31 to
60302fe
Compare
sushantdhiman
approved these changes
Jun 12, 2018
eseliger
approved these changes
Jun 12, 2018
janmeier
approved these changes
Jun 12, 2018
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.
Pull Request check-list
Please make sure to review and check all of these items:
npm run testornpm run test-DIALECTpass with this change (including linting)?Description of change
The document says that the username, the password and the database can be passed as options with URL. (e.g.
new Sequelize('mysql://localhost:3306', { database, username, password }))But the current behavior does not honour these fields in options. This PR allows to pass these fields as options.