-
Notifications
You must be signed in to change notification settings - Fork 85
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
Partitioning: Initial suggestion #485
base: main
Are you sure you want to change the base?
Conversation
lib/partitioning.ex
Outdated
partition_name = table <> "_" <> "#{key}" | ||
|
||
if partition_exists?(repo, resource, partition_name) do | ||
{:error, :allready_exists} |
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.
ty
{:error, :allready_exists} | |
{:error, :already_exists} |
The general pattern looks good, although there will be some details to talk through and some docs about how to manage partitions, maybe some builtin changes to do it automatically etc. The migration generator is going to have to have some kind of handling for changing the partition strategy as well. I noticed some unfinished bits as well, i.e for creating range partitions. We should definitely avoid the string interpolation in the SQL there as well. |
I made some updates before reading your comments. |
Also found some problems when updating the primary key on multitenancy resource. |
Could we separate out that other fix that you mentioned into its own PR so that I can review in isolation? |
Hi!
This is my initial suggestion to include "partitioning" support.
Feedback is appreciated!
Contributor checklist