Magento – Change Attribute Backend Type from Varchar to Text

attributesdatabaseeavproduct-attribute

My product attribute exceeded the 255 character limit of varchar, so I came across the solution to change its backend_type to text.

Should this operation be considered safe (in the terms that it will not break anything, or leave garbage in the database)?

Best Answer

If you change the backend_type Magento will also change the EAV table.

It will use catalog_product_entity_text instead of catalog_product_entity_varchar.

You will have to move all the records for that attribute to the new table. If you do not do this operation you may create orphans records and db inconsistencies.

You may try with an insert from select. Best if you write down a small PHP script.

WARNING: Make a full DB backup before you try this.

Related Topic