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: some drivers set the wrong database name when defined from url #8058

Conversation

imnotjames
Copy link
Contributor

@imnotjames imnotjames commented Aug 10, 2021

Description of change

the Driver.database was getting set only from the options and
completely ignored the connection URLs being passed to them. this
meant that in some cases the migrations would apply to the wrong
database or schema if connection url strings were used

fixes #8057

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

the `Driver.database` was getting set only from the options and
completely ignored the connection URLs being passed to them.  this
meant that in some cases the migrations would apply to the wrong
database or schema if connection url strings were used
@imnotjames imnotjames merged commit a3a3284 into typeorm:master Aug 10, 2021
@imnotjames imnotjames deleted the fix/8057/stop-erroneously-setting-database branch August 10, 2021 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Database Connection information is lost on connect() call in the PostgresDriver
1 participant