fixing container id update for ooold installations
authorPhilipp Schüle <p.schuele@metaways.de>
Wed, 12 Jul 2017 16:35:40 +0000 (18:35 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 13 Jul 2017 09:57:21 +0000 (11:57 +0200)
Change-Id: I96b6e0211b7351d282a0c802ca6f82bd7640125f
Reviewed-on: http://gerrit.tine20.com/customers/5131
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Setup/Update/Release10.php

index 204166d..3e9c87d 100644 (file)
@@ -1303,6 +1303,11 @@ class Tinebase_Setup_Update_Release10 extends Setup_Update_Abstract
                 $this->_backend->dropForeignKey('sales_contracts', 'sales_contracts::container_id--container::id');
             } catch (Exception $e) {}
         }
+        if ($this->_backend->tableExists('sales_contracts')) {
+            try {
+                $this->_backend->dropForeignKey('sales_contracts', 'tine20_erp_contracts::container_id--container::id');
+            } catch (Exception $e) {}
+        }
         if ($this->_backend->tableExists('timetracker_timeaccount')) {
             try {
                 $this->_backend->dropForeignKey('timetracker_timeaccount', 'timeaccount::container_id--container::id');