Hi all,

For testing purposes I declare the following custom field for the Accounts module under $installdefs array:
PHP Code:
'custom_fields' => array(
        array(
            
'name' => 'color',
            
'label' => 'Color:',
            
'type' => 'char',
            
'max_size' => 36,
            
'require_option' => 'optional',
            
'default_value' => '',
            
'ext1' => '',
            
'ext2' => '',
            
'ext3' => '',
            
'ext4' => '',
            
'mass_update' => 0,
            
'duplicate_merge' => 0,
            
'help' => '',
            
'audited' => 0,
            
'module' => 'Accounts',
        ),
    ) 
Installation proceeds successfully. When I try to uninstall my custom module, the above custom field is not uninstalled with the following error in sugarcrm.log:
Code:
"
.
.
16/4/2007 10:05:29 am,047 [896] DEBUG SugarCRM - Uninstalling Custom Fields...
16/4/2007 10:05:29 am,129 [896] INFO SugarCRM - Query:DELETE FROM  fields_meta_data WHERE id='Accountscolor'
16/4/2007 10:05:29 am,144 [896] INFO SugarCRM - Query Execution Time:0.014381
16/4/2007 10:05:29 am,144 [896] INFO SugarCRM - Query:ALTER TABLE accounts_cstm DROP  COLUMN color
16/4/2007 10:05:29 am,145 [896] INFO SugarCRM - Query Execution Time:0.00068700000000002
16/4/2007 10:05:29 am,146 [896] ERROR SugarCRM - MySQL error 1091: Can't DROP 'color'; check that column/key exists
.
.
"
Any idea on how to fix this? Thank you.

- Windows XP Pro SP2
- SugarCRM OS 4.5.1b
- Apache Server 2.2.3
- PHP 5.2.0
- MySQL Server 5.0.27