Skip to content

Commit

Permalink
tweak(Tinebase/Update/16.1): customfield_config fk might not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
pschuele committed Mar 20, 2024
1 parent e320adc commit 051f202
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tine20/Tinebase/Setup/Update/16.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ public function update001()
Tinebase_TransactionManager::getInstance()->rollBack();

if ($this->getTableVersion('customfield_config') < 7) {
$this->_backend->dropForeignKey('customfield_config', 'config_customfields::application_id--applications::id');
try {
$this->_backend->dropForeignKey('customfield_config', 'config_customfields::application_id--applications::id');
} catch (Exception $e) {
// might not exist
Tinebase_Exception::log($e);
}
$this->_backend->dropIndex('customfield_config', 'application_id-name');
$this->_backend->addIndex('customfield_config', new Setup_Backend_Schema_Index_Xml(
'<index>
Expand Down

0 comments on commit 051f202

Please sign in to comment.