named index
This commit is contained in:
@@ -120,10 +120,12 @@ module Graph
|
||||
end
|
||||
end
|
||||
|
||||
index_name =
|
||||
"index_#{graph_name}_on_#{node_type.name&.underscore&.gsub("/", "_")}_#{virtual_column}"
|
||||
add_index(
|
||||
"#{graph_name}_#{kind_plural}_#{partition}",
|
||||
"(data::jsonb->>'#{virtual_column}')",
|
||||
**options.merge(where: "type = '#{node_type}'"),
|
||||
**options.merge(where: "type = '#{node_type}'", name: index_name),
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user