Push the boolean and date custom-field predicates and custom-field sorting down to JSONB expressions so the overview stops classifying custom-field values in memory. A GIN index on custom_field_values.value keeps the boolean membership predicates index-served.
148 lines
No EOL
3.5 KiB
JSON
148 lines
No EOL
3.5 KiB
JSON
{
|
|
"attributes": [
|
|
{
|
|
"allow_nil?": false,
|
|
"default": "fragment(\"gen_random_uuid()\")",
|
|
"generated?": false,
|
|
"precision": null,
|
|
"primary_key?": true,
|
|
"references": null,
|
|
"scale": null,
|
|
"size": null,
|
|
"source": "id",
|
|
"type": "uuid"
|
|
},
|
|
{
|
|
"allow_nil?": true,
|
|
"default": "nil",
|
|
"generated?": false,
|
|
"precision": null,
|
|
"primary_key?": false,
|
|
"references": null,
|
|
"scale": null,
|
|
"size": null,
|
|
"source": "value",
|
|
"type": "map"
|
|
},
|
|
{
|
|
"allow_nil?": true,
|
|
"default": "nil",
|
|
"generated?": false,
|
|
"precision": null,
|
|
"primary_key?": false,
|
|
"references": {
|
|
"deferrable": false,
|
|
"destination_attribute": "id",
|
|
"destination_attribute_default": null,
|
|
"destination_attribute_generated": null,
|
|
"index?": false,
|
|
"match_type": null,
|
|
"match_with": null,
|
|
"multitenancy": {
|
|
"attribute": null,
|
|
"global": null,
|
|
"strategy": null
|
|
},
|
|
"name": "custom_field_values_member_id_fkey",
|
|
"on_delete": "delete",
|
|
"on_update": null,
|
|
"primary_key?": true,
|
|
"schema": "public",
|
|
"table": "members"
|
|
},
|
|
"scale": null,
|
|
"size": null,
|
|
"source": "member_id",
|
|
"type": "uuid"
|
|
},
|
|
{
|
|
"allow_nil?": true,
|
|
"default": "nil",
|
|
"generated?": false,
|
|
"precision": null,
|
|
"primary_key?": false,
|
|
"references": {
|
|
"deferrable": false,
|
|
"destination_attribute": "id",
|
|
"destination_attribute_default": null,
|
|
"destination_attribute_generated": null,
|
|
"index?": false,
|
|
"match_type": null,
|
|
"match_with": null,
|
|
"multitenancy": {
|
|
"attribute": null,
|
|
"global": null,
|
|
"strategy": null
|
|
},
|
|
"name": "custom_field_values_custom_field_id_fkey",
|
|
"on_delete": "delete",
|
|
"on_update": null,
|
|
"primary_key?": true,
|
|
"schema": "public",
|
|
"table": "custom_fields"
|
|
},
|
|
"scale": null,
|
|
"size": null,
|
|
"source": "custom_field_id",
|
|
"type": "uuid"
|
|
}
|
|
],
|
|
"base_filter": null,
|
|
"check_constraints": [],
|
|
"create_table_options": null,
|
|
"custom_indexes": [
|
|
{
|
|
"all_tenants?": false,
|
|
"concurrently": false,
|
|
"error_fields": [
|
|
"value"
|
|
],
|
|
"fields": [
|
|
{
|
|
"type": "string",
|
|
"value": "value"
|
|
}
|
|
],
|
|
"include": null,
|
|
"message": null,
|
|
"name": "custom_field_values_value_gin_index",
|
|
"nulls_distinct": true,
|
|
"prefix": null,
|
|
"table": null,
|
|
"unique": false,
|
|
"using": "gin",
|
|
"where": null
|
|
}
|
|
],
|
|
"custom_statements": [],
|
|
"has_create_action": true,
|
|
"hash": "6B19604F0AA26F503094E6AF5086FDAE0D054096B24099376EFF4BBCFF7E3CB5",
|
|
"identities": [
|
|
{
|
|
"all_tenants?": false,
|
|
"base_filter": null,
|
|
"index_name": "custom_field_values_unique_custom_field_per_member_index",
|
|
"keys": [
|
|
{
|
|
"type": "atom",
|
|
"value": "member_id"
|
|
},
|
|
{
|
|
"type": "atom",
|
|
"value": "custom_field_id"
|
|
}
|
|
],
|
|
"name": "unique_custom_field_per_member",
|
|
"nils_distinct?": true,
|
|
"where": null
|
|
}
|
|
],
|
|
"multitenancy": {
|
|
"attribute": null,
|
|
"global": null,
|
|
"strategy": null
|
|
},
|
|
"repo": "Elixir.Mv.Repo",
|
|
"schema": null,
|
|
"table": "custom_field_values"
|
|
} |