I would like to add some attributes to a custom table with an install script. But whatever I try it didn't work.

$installer = $this;
$installer->addAttribute(custom_data, 'street', array( ... )

Magento just showed my an error page that this model doesn't exist. But I have this table in my database. What else am I missing?

2 Answers 2


Try this:


I usually opt to use the following method in installation scripts. It's much easier and you don't need to know the resource setup methods. It works on all types of Magento tables.

// To add a custom column to the quote item table

 $quoteTable = $this->getTable('sales/quote_item');

    "ALTER TABLE `$quoteTable` ADD test DECIMAL(12,4) DEFAULT NULL COMMENT 'Test';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.