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

Looks like a bug in pg adapter #270

Closed
apneadiving opened this issue Oct 9, 2015 · 3 comments
Closed

Looks like a bug in pg adapter #270

apneadiving opened this issue Oct 9, 2015 · 3 comments

Comments

@apneadiving
Copy link
Contributor

I'd like to understand why we have almost same code in abstract and pg adapters, only difference is a call to environmentify which looks legit in abstract but is not present in pg's.
So I think I could remove the code in pg's and only rely on the abstract controller. Would be cool to have confirmation. Thanks

The 2 files

@bradrobertson
Copy link
Contributor

Ya I think you're right. Looks like they're not doing anything different other than environmentify.

Note that the concept of environmentify should (has) changed to be more of a "translate this tenant name into some other tenant name" and environmentify was the original implementation of this (translate "tenant1" to "tenant1-development".

I'd love to abstract that out to just be a proc that someone can configure that receives the tenant name and returns the translated name that works for ALL adapters (not just connection based). I just don't have any time to actually do this unfortunately. There's an open issue to this affect but I don't think anything has come from it

@apneadiving
Copy link
Contributor Author

ok, so do you mind if I just remove the confusing override in pg's adapter?

@bradrobertson
Copy link
Contributor

sure

bradrobertson added a commit that referenced this issue Nov 26, 2015
Custom connection options for tenants (basically to store on different servers) #264 #269 #270
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

No branches or pull requests

2 participants