From a5a0f8355f4d8a34cb0956363bed84cb401437f0 Mon Sep 17 00:00:00 2001 From: Steven Fritzsche Date: Wed, 9 Sep 2015 17:03:36 +0200 Subject: [PATCH] [Feature] Update script > compatibility with Magento 1.4.2.0 up to 1.9.2.0 --- .../mysql4-upgrade-0.0.3-1.0.0.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/code/community/Aoe/AsyncCache/sql/aoeasynccache_setup/mysql4-upgrade-0.0.3-1.0.0.php b/app/code/community/Aoe/AsyncCache/sql/aoeasynccache_setup/mysql4-upgrade-0.0.3-1.0.0.php index 2b2803b..cae13b1 100644 --- a/app/code/community/Aoe/AsyncCache/sql/aoeasynccache_setup/mysql4-upgrade-0.0.3-1.0.0.php +++ b/app/code/community/Aoe/AsyncCache/sql/aoeasynccache_setup/mysql4-upgrade-0.0.3-1.0.0.php @@ -5,16 +5,14 @@ $installer = $this; $installer->startSetup(); +$table = $installer->getTable('aoeasynccache/asynccache'); +$connection = $installer->getConnection(); // truncate table first -$installer->getConnection()->truncateTable($installer->getTable('aoeasynccache/asynccache')); +$connection->truncate($table); // add index -$installer->getConnection()->addIndex( - $installer->getTable('aoeasynccache/asynccache'), - $installer->getIdxName('aoeasynccache/asynccache', array('mode', 'tags', 'status')), - array('mode', 'tags', 'status'), - Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE -); +$query = 'CREATE UNIQUE INDEX IDX_ASYNCCACHE_MODE_TAGS_STATUS ON '. $table . ' (`mode`, `tags`, `status`)'; +$connection->raw_query($query); $installer->endSetup(); \ No newline at end of file