Catch error if index doesn't exist
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 22 Jan 2011 02:18:55 +0000 (21:18 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 22 Jan 2011 02:18:55 +0000 (21:18 -0500)
ansel/migration/8_ansel_upgrade_sqlhierarchical.php

index 64a8cf5..ccff08d 100644 (file)
@@ -19,7 +19,9 @@ class AnselUpgradeSqlHierarchical extends Horde_Db_Migration_Base
      */
     public function up()
     {
-        $this->removeIndex('ansel_shares', 'share_parents');
+        try {
+            $this->removeIndex('ansel_shares', 'share_parents');
+        } catch (Exception $e) {}
         $this->addColumn('ansel_shares', 'share_name', 'string', array('limit' => 255, 'null' => false));
         $this->changeColumn('ansel_shares', 'share_parents', 'text');