We are using the Extension FollowUp E-Mail from AheadWorks. The Extension has bugs in the sql install scripts... they are trying to add a column to a table but don't check if the column does already exist, which causes an error if the column already exists.
<?php
$installer = $this;
/* $installer Mage_Core_Model_Resource_Setup */
$installer->startSetup();
$installer->run("
ALTER TABLE {$this->getTable('awcore/logger')} ADD `custom_field_4` VARCHAR( 255 ) NOT NULL AFTER `custom_field_3`;
ALTER TABLE {$this->getTable('awcore/logger')} ADD INDEX ( `custom_field_4` );
");
$installer->endSetup();
I get this error :
a:5:{i:0;s:197:"Error in file: "/srv/www/vhosts/hf/app/code/local/AW/Core/sql/awcore_setup/mysql4-upgrade-1.0.1-1.0.2.php" - SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'custom_field_4'
/srv/www/vhosts/hausfux/app/code/core/Mage/Core/Model/Resource/Setup.php(644
#1 /srv/www/vhosts/hf/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.0.1', '1.0$
#2 /srv/www/vhosts/hf/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.0.1', '1.0.3')
#3 /srv/www/vhosts/hf/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /srv/www/vhosts/hf/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /srv/www/vhosts/hf/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules()
#6 /srv/www/vhosts/hf/app/Mage.php(690): Mage_Core_Model_App->run(Array)
#7 /srv/www/vhosts/hf/index.php(70): Mage::run('', 'store')
#8 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}