Skip to content

Instantly share code, notes, and snippets.

@dfelton
Created June 10, 2022 14:57
Show Gist options
  • Save dfelton/6f87b325d168cb7cec56d765e759c793 to your computer and use it in GitHub Desktop.
Save dfelton/6f87b325d168cb7cec56d765e759c793 to your computer and use it in GitHub Desktop.
Handy MySQL Selects for Magento 2
select
t3.entity_type_code,
t2.attribute_code,
t2.attribute_model,
t2.backend_model,
t2.backend_type,
t2.backend_table,
t2.frontend_model,
t2.frontend_input,
t2.frontend_label,
t2.frontend_class,
t2.source_model,
t2.is_required,
t2.is_user_defined,
t2.default_value,
t2.is_unique,
t2.note,
t1.is_visible,
t1.input_filter,
t1.multiline_count,
t1.validate_rules,
t1.is_system,
t1.sort_order,
t1.data_model,
t1.is_used_in_grid,
t1.is_visible_in_grid,
t1.is_filterable_in_grid,
t1.is_searchable_in_grid,
t1.is_used_for_customer_segment
from
customer_eav_attribute as t1
inner join eav_attribute as t2
on t1.attribute_id = t2.attribute_id
inner join eav_entity_type as t3
on t3.entity_type_id = t2.entity_type_id
order by
t3.entity_type_code,
t2.attribute_code
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment