title: How to set default value for an attribute through install script?
body: <p>I have created an attributes using an install script for a custom module. One attribute is a drop-down which only has two options as 'yes','no'. The other attribute is a text field. I need to set default values through this script. I tied the following. But didn't work.</p>
  
  <pre><code>$th =  new Mage_Catalog_Model_Resource_Setup();  
  $th-&gt;addAttribute(Mage_Catalog_Model_Product::ENTITY, 'credit', array(
              'group' =&gt; 'Prices',
              'type' =&gt; 'text',
              'backend' =&gt; '',
              'frontend' =&gt; '',
              'label' =&gt; 'Credit rewards',
              'input' =&gt; 'text',
              'global' =&gt; Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
              'visible' =&gt; true,
              'required' =&gt; false,
              'user_defined' =&gt; true,
              'default' =&gt; 'kkkkkkkk', // this is default value. but is's not setting
              'searchable' =&gt; false,
              'filterable' =&gt; true,
              'comparable' =&gt; false,
              'visible_on_front' =&gt; true,
              'visible_in_advanced_search' =&gt; true,
              'used_in_product_listing' =&gt; true,
              'unique' =&gt; false,
              'apply_to' =&gt; 'simple',
          ) );
  </code></pre>
  
  <p>Any suggestion will be appreciated. Thanks in advanced.</p>