-
Notifications
You must be signed in to change notification settings - Fork 49
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
Triplex.all should not return prefixes #74
Comments
Hi, I will have a look at this (As per email). I am happy for yuo to assign it to me if you like. Andrew |
Hi Kelvin, I have been looking through the code. Without testing it looks like:
Does this align with your thinking? Regards, Andrew |
Hi, I will also create a separate issue for the addition of Andrew |
Not quite, the idea is to do something like |
Today, |
Got it. Thanks I will go back and look again. Andrew |
Hi Kelvin, I am new to contributing to open source ... will you merge the pull request with Regards, Andrew |
Yep, that's the plan |
Hi Kelvin, I have gone back through the code:
I was wondering what the use case is for prepending the prefix field from the config? Thanks, Andrew |
Basically, it is an option to add a prefix to all tenant schemas. That is good to avoid conflicts with other schemas on the db. Also useful to be allowed to use the id of a register as the name of a tenant, so that the prefix would make it a valid schema name. |
Hi Kelvin, I made the following changes based on our previous discussion:
It works fine for
Before I go to further I wanted your guidance on whether this should be changed or if the code using the Thanks in advance. Andrew |
Hi Kelvin, I have been thinking about my comment above. It makes sense that the Are you happy with this approach? Andrew |
Yeah, postgres and mysql should work the same. Will review your work soon, thanks for the PR.
Best,
Kelvin
Em 4 de nov. de 2020 00:00 -0300, Andrew Barr <[email protected]> escreveu:
… Hi Kelvin,
I have been thinking about my comment above.
It makes sense that the MySql functionality works in the same way as the Postgres code. When you get a list of tenants from the tenant table it should return the full schema name (i.e. prefix_tenant) and then it should be removed as per your preferred solution.
Are you happy with this approach?
Andrew
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi Kelvin, Just checking in to make sure I have resolved the requested changes properly ... if not please let me know ... otherwise I expect you have been busy. Andrew |
It should take
config().tenant_prefix
out. It is a breaking change though, as some people might be relying on the fact that it returns the prefixes.A
Triplex.migrate_all
would be nice addition too.The text was updated successfully, but these errors were encountered: