diff --git a/tine20/Sales/Setup/Update/17.php b/tine20/Sales/Setup/Update/17.php index d52152e1c8..13cf40f8ba 100644 --- a/tine20/Sales/Setup/Update/17.php +++ b/tine20/Sales/Setup/Update/17.php @@ -472,7 +472,8 @@ public function update009() $numConf = Tinebase_Controller_NumberableConfig::getInstance()->search( Tinebase_Model_Filter_FilterGroup::getFilterForModel(Tinebase_Model_NumberableConfig::class, [ - [TMFA::FIELD => Tinebase_Model_NumberableConfig::FLD_BUCKET_KEY, TMFA::OPERATOR => TMFA::OP_EQUALS, TMFA::VALUE => Sales_Model_Customer::class . '#number'] + [TMFA::FIELD => Tinebase_Model_NumberableConfig::FLD_MODEL, TMFA::OPERATOR => TMFA::OP_EQUALS, TMFA::VALUE => Sales_Model_Customer::class], + [TMFA::FIELD => Tinebase_Model_NumberableConfig::FLD_PROPERTY, TMFA::OPERATOR => TMFA::OP_EQUALS, TMFA::VALUE => 'number'] ]))->getFirstRecord(); $numConf->{Tinebase_Model_NumberableConfig::FLD_ZEROFILL} = 0; diff --git a/tine20/Tinebase/Setup/Update/17.php b/tine20/Tinebase/Setup/Update/17.php index a78d8208a0..07e3b598e1 100644 --- a/tine20/Tinebase/Setup/Update/17.php +++ b/tine20/Tinebase/Setup/Update/17.php @@ -383,6 +383,12 @@ public function update015(): void Tinebase_TransactionManager::getInstance()->rollBack(); $backend = Tinebase_Controller_NumberableConfig::getInstance()->getBackend(); + if (!$this->_backend->tableExists($backend->getTableName())) { + $this->updateSchema(Tinebase_Config::APP_NAME, [ + Tinebase_Model_NumberableConfig::class, + ]); + } + $this->_db->query('UPDATE ' . $backend->getTablePrefix() . $backend->getTableName() . ' SET deleted_time = "1970-01-01 00:00:00" WHERE deleted_time IS NULL'); $this->_db->query('DELETE FROM ' . $backend->getTablePrefix() . $backend->getTableName() . ' WHERE model = "MeetingManager_Model_Top" AND property = "decision_number"');