diff --git a/modules/Migration/schema/660_to_700.php b/modules/Migration/schema/660_to_700.php index dacd0ae8a9699b15dbee1ceb3dda16b4d526e221..79e9fd958d25f6b0f60fe23bc0b29050dd0ef941 100644 --- a/modules/Migration/schema/660_to_700.php +++ b/modules/Migration/schema/660_to_700.php @@ -438,6 +438,21 @@ if(defined('VTIGER_UPGRADE')) { $db->pquery('UPDATE vtiger_currency_info SET currency_symbol=? WHERE currency_name=?', array('E£', 'Egypt, Pounds')); //setting is_private value of comments to 0 if internal comments is not supported for that module + $modCommentsInstance = Vtiger_Module::getInstance('ModComments'); + $blockInstance = Vtiger_Block::getInstance('LBL_MODCOMMENTS_INFORMATION', $modCommentsInstance); + if ($blockInstance) { + $fieldInstance = Vtiger_Field::getInstance('is_private', $modCommentsInstance); + if (!$fieldInstance) { + $fieldInstance = new Vtiger_Field(); + $fieldInstance->name = 'is_private'; + $fieldInstance->label = 'Is Private'; + $fieldInstance->uitype = 7; + $fieldInstance->column = 'is_private'; + $fieldInstance->columntype = 'INT(1) DEFAULT 0'; + $fieldInstance->typeofdata = 'I~O'; + $blockInstance->addField($fieldInstance); + } + } $commentIds = array(); $internalCommentModules = Vtiger_Functions::getPrivateCommentModules(); $commentsResult = $db->pquery('SELECT vtiger_modcomments.modcommentsid FROM vtiger_modcomments