I wrote a simple sql upgrade script to add a custom attribute to the customer table.
My script :
< ?php
$installer = $this;
$installer->startSetup();
$installer->addAttribute('customer', 'whatsapp_active', array(
'type' => 'static',
'input' => 'boolean',
'label' => 'Is Customer Active',
'default' => '1',
'visible' => true,
'required' => false,
'user_defined' => true,
));
Mage::getSingleton('eav/config')
->getAttribute('customer', 'whatsapp_active')
->setData('used_in_forms', array('adminhtml_customer'))
->save();
$installer->endSetup();
I get the error :
a:5:{i:0;s:57:"Source model "" not found for attribute "whatsapp_status"";i:1;s:2983:"#0 /var/www/html/fresh/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(387): Mage::exception('Mage_Eav', 'Source model ""...')
#1 /var/www/html/fresh/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()
Now, even when I have removed the file, then also I get the same error.
PS : I have changed, my core_resource
table code customer_setup
versions accordingly.
So, what is the thing which I am missing?