Skip to content

Rails model class cannot be defined with a partition with sub-partitions #91

@tomer-zadara

Description

@tomer-zadara

For example, setting the model class with range_partition_by { "(report_date::date)" }
I cannot set sub-partitions of hash kind, although I can create these partitions and sub partitions using:
create_range_partition_of
:main_table,
name: main_table_partition,
start_range: "#{current_year}-#{current_month}-01",
end_range: "#{current_year}-#{current_month}-#{current_month_last_day}",
partition_type: :hash,
partition_key: :org_id

and then create sub-partitions:
10.times do |i|
create_hash_partition_of
main_table_partition,
name: "#{main_table_partition}_org#{i}".to_sym,
modulus: 10,
remainder: i
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions