startSetup(); $customerTaxClassIds = $installer->getConnection()->fetchCol( "SELECT class_id FROM {$installer->getTable('tax_class')} WHERE class_type = 'CUSTOMER' ORDER BY class_id ASC" ); if (count($customerTaxClassIds) > 0) { $installer->run( "UPDATE {$installer->getTable('customer_group')} SET tax_class_id = {$customerTaxClassIds[0]} WHERE tax_class_id NOT IN (".implode(',', $customerTaxClassIds).")" ); } $installer->endSetup();