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

Bug: Triplex.all/1 does not consider tenant_prefix #82

Open
MMore opened this issue Jun 27, 2021 · 2 comments
Open

Bug: Triplex.all/1 does not consider tenant_prefix #82

MMore opened this issue Jun 27, 2021 · 2 comments

Comments

@MMore
Copy link

MMore commented Jun 27, 2021

Hello!

I have a database with different schemata, some belong to tenants, some not. To separate it better with Triplex, I am using the tenant_prefix config option. When I run Triplex.all() I'd expect to get only schemata which start with that configured prefix. But I just get all schemata in the database. I've noticed thatTriplex.exists?/1 takes the tenant_prefix into consideration.

@kelvinst
Copy link
Contributor

kelvinst commented Jul 1, 2021

Hey @MMore, thanks for pointing that out. A PR for that is welcome. Also, you might want to check #74, and talk to @abarr, since he was working on some improvements to Triplex.all already.

@kelvinst
Copy link
Contributor

kelvinst commented Jul 1, 2021

Also, if you need to workaround it, you can use the config reserved_tenants to make sure that schema is not going to be created as well as not returned on Triplex.all

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