Search code examples
magentoentity-attribute-value

Magento Custom Module with EAV - Fails creating text table


I'm trying to create a custom module using Magento's EAV structure and have been using this tutorial as a guide: http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-7-advanced-orm-entity-attribute-value

Everything seems to be working except my install script is always failing on trying to create the _text table. It creates the first 3 - entityname_datetime, entityname_int and entityname_decimal and then throws the exception: Can't create table: entityname_text from the core resource setup model.

I've tried changing the table name but it fails at the same point. Except for changing the model and entity names, my code exactly mirrors that from the tutorial.

Any tips for debugging? Using Mage::log within the core resource setup model doesn't seem to be working, though I can't fathom why.


Solution

  • This is bug that was recently introduced to the Community Edition version of the product. It's been reported to the core team via their public-with-a-login bug tracker. For now I'd skip creating non-varchar text types and continue working your way through the tutorial. (not ideal, but as the tutorial suggests, you'll it's a rare use-case that calls for a scratch EAV model)