-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configurable connection options for tenants
add config specs fix after @mikecmpbll review bug fix after clean up extend flexible options to other adapters update documentation removed wrong method override, fix #270 add specs provide details in exceptions fix #269 remove spec naming and doc improvements fix class name after refactoring move db overrides to spec file ruby is not mL add rescue_from to rescued errors: makes sense, people could try to interact with and database exception fixes removed adbc expectations as I can't test them locally every single tenant must specify all database connection options remove misleading || statement remove deprecated specs reset table names prior to spec runs DRY code fix typo reintroduce conditional reset bug fix remove if statements, always create tenant config hash refactoring remote specs test fix edge case rescue only ActiveRecord::StatementInvalid documentation edition changed exception method names
- Loading branch information
1 parent
e9aed3a
commit abdffbf
Showing
17 changed files
with
326 additions
and
138 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
abdffbf
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.
I don't quite get this.
connect_to_new
is defined in both the abstract adapter and postgres adapter, but with different implementations, the postgres always uses schema anyways, but the goal here seems to being able to use different databases.I cannot get this to work in my project,
use_schemas
isfalse
.abdffbf
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.
@masterkain postgres does NOT always use schemas, it has both options. The goal is to allow different physical servers to be switched against.
Note that this hasn't been released yet. I believe there's another PR that needs some cleaning up to deal with threading issues.
If you want to play with this you'll have to reference github directly.
Also note that I didn't write this so open to hearing feedback on what you find and, if it needs any cleanup, happy to accept PRs