I have added to the category entity a lot of custom attributes, now when I try to reindex I get the error
SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
I Know that means that the flat tables are too large and indeed there are a lot of columns there. I don't need my custom attributes in that table so I can remove them, but how can i do that? I found that if I set the filterable and comparable to false they shouldn't be in the flat table. Any help will be appreciated
public function getDefaultEntities()
{
return array(
'catalog_category' => array(
'entity_model' => 'catalog/category',
'attribute_model' => 'catalog/resource_eav_attribute',
'additional_attribute_table' => 'catalog/eav_attribute',
'entity_attribute_collection' => 'catalog/category_attribute_collection',
'table' => 'catalog/category',
'attributes' => array(
'cat_type' => array(
'group' => 'General',
'label' => 'Category Type',
'type' => 'int',
'input' => 'select',
'default' => '0',
'class' => '',
'backend' => '',
'frontend' => '',
'source' => 'eav/entity_attribute_source_cattype',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'visible' => true,
'required' => false,
'user_defined' => false,
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'visible_in_advanced_search' => false,
'unique' => false
),
Edit:
I have deleted the attributes and it works then I ran the install script again, all of them have the filterable and comparable set to false as the example I posted below, It shows me the error again, What I'm missing?
Edit:
I checked the flat category table and I see that all the attributes are added them. So the filterable and comparable just works for product attributes? I thought that they will be the same values for category products.
Is there anyway to exclude my attributes from that table? I can exclude them modifying the file that create the table, obviously in my local folder but I want to know which is the clean way to do this?
Check eav_attribute table and column named used_in_product_listing set it to 0 or false and it shouldn't be added to category product flat table.