7 * @license http://www.gnu.org/licenses/agpl.html AGPL3
8 * @copyright Copyright (c) 2016-2017 Metaways Infosystems GmbH (http://www.metaways.de)
9 * @author Philipp Schüle <p.schuele@metaways.de>
11 class Tinebase_Setup_Update_Release10 extends Setup_Update_Abstract
16 * @see 0012162: create new MailFiler application
18 public function update_0()
20 $release9 = new Tinebase_Setup_Update_Release9($this->_backend);
21 $release9->update_9();
22 $this->setApplicationVersion('Tinebase', '10.1');
28 * @see 0012300: add container owner column
30 public function update_1()
32 $release9 = new Tinebase_Setup_Update_Release9($this->_backend);
34 $release9->update_4();
35 } catch (Zend_Db_Exception $zde) {
36 Tinebase_Exception::log($zde);
38 $this->setApplicationVersion('Tinebase', '10.2');
44 * change length of groups.description column from varchar(255) to text
46 public function update_2()
48 $release9 = new Tinebase_Setup_Update_Release9($this->_backend);
49 $release9->update_5();
50 $this->setApplicationVersion('Tinebase', '10.3');
58 public function update_3()
60 $release9 = new Tinebase_Setup_Update_Release9($this->_backend);
61 $release9->update_10();
62 $this->setApplicationVersion('Tinebase', '10.4');
66 * needs to be done again to make sure we have the column!
68 * @see 0012300: add container owner column
70 public function update_4()
72 $release9 = new Tinebase_Setup_Update_Release9($this->_backend);
74 $release9->update_4();
75 } catch (Zend_Db_Exception $zde) {
76 Tinebase_Exception::log($zde);
78 $this->setApplicationVersion('Tinebase', '10.5');
84 * add account sync scheduler job
86 public function update_5()
88 $scheduler = Tinebase_Core::getScheduler();
89 Tinebase_Scheduler_Task::addAccountSyncTask($scheduler);
91 $this->setApplicationVersion('Tinebase', '10.6');
97 * update timemachine_modlog table
99 public function update_6()
101 if (!$this->_backend->columnExists('instance_id', 'timemachine_modlog')) {
103 $this->_backend->renameTable('timemachine_modlog', 'timemachine_modlog_bkp');
104 $db = Tinebase_Core::getDb();
105 if ($db instanceof Zend_Db_Adapter_Pdo_Pgsql) {
106 $db->exec('ALTER INDEX "' . SQL_TABLE_PREFIX . 'timemachine_modlog_pkey" RENAME TO ' . SQL_TABLE_PREFIX . 'timemachine_modlog_pkey_bkp');
107 $db->exec('ALTER INDEX "' . SQL_TABLE_PREFIX . 'timemachine_modlog_seq" RENAME TO ' . SQL_TABLE_PREFIX . 'timemachine_modlog_seq_bkp');
108 $db->exec('ALTER INDEX "' . SQL_TABLE_PREFIX . 'timemachine_modlog_unique-fields_key" RENAME TO "' . SQL_TABLE_PREFIX . 'timemachine_modlog_unique-fields_key_bkp"');
111 $this->_backend->createTable(new Setup_Backend_Schema_Table_Xml('<table>
112 <name>timemachine_modlog</name>
119 <notnull>true</notnull>
122 <name>instance_id</name>
125 <notnull>false</notnull>
128 <name>instance_seq</name>
130 <notnull>true</notnull>
131 <autoincrement>true</autoincrement>
134 <name>change_type</name>
137 <notnull>false</notnull>
140 <name>application_id</name>
143 <notnull>true</notnull>
146 <name>record_id</name>
149 <notnull>false</notnull>
152 <name>record_type</name>
155 <notnull>false</notnull>
158 <name>record_backend</name>
161 <notnull>false</notnull>
164 <name>modification_time</name>
165 <type>datetime</type>
166 <notnull>true</notnull>
169 <name>modification_account</name>
172 <notnull>true</notnull>
175 <name>modified_attribute</name>
178 <notnull>false</notnull>
181 <name>old_value</name>
185 <name>new_value</name>
197 <notnull>true</notnull>
201 <primary>true</primary>
207 <name>instance_id</name>
209 <name>instance_id</name>
213 <name>instance_seq</name>
214 <unique>true</unique>
216 <name>instance_seq</name>
226 <name>unique-fields</name>
227 <unique>true</unique>
229 <name>application_id</name>
232 <name>record_id</name>
235 <name>record_type</name>
238 <name>modification_time</name>
241 <name>modification_account</name>
244 <name>modified_attribute</name>
255 $appIds[] = Tinebase_Application::getInstance()->getApplicationByName('Addressbook')->getId();
256 if (Tinebase_Application::getInstance()->isInstalled('Calendar')) {
257 $appIds[] = Tinebase_Application::getInstance()->getApplicationByName('Calendar')->getId();
260 $select = $db->select()->from(SQL_TABLE_PREFIX . 'timemachine_modlog_bkp')->order('modification_time ASC')
261 ->where($db->quoteInto($db->quoteIdentifier('application_id') . ' IN (?)', $appIds))
262 ->where($db->quoteInto($db->quoteIdentifier('record_type') . ' IN (?)', array('Addressbook_Model_Contact', 'Calendar_Model_Resource')))
263 ->where($db->quoteInto($db->quoteIdentifier('modified_attribute') . ' IN (?)', array('email', 'email_home')));
265 $stmt = $db->query($select);
266 $resultArray = $stmt->fetchAll(Zend_Db::FETCH_ASSOC);
268 if (count($resultArray) > 0) {
269 foreach($resultArray as $row) {
270 $row['client'] = 'update script';
271 $db->insert(SQL_TABLE_PREFIX . 'timemachine_modlog', $row);
275 $this->setTableVersion('timemachine_modlog', '5');
278 $this->setApplicationVersion('Tinebase', '10.7');
284 * update roles and application table
286 public function update_7()
288 if (!$this->_backend->columnExists('is_deleted', 'roles')) {
289 $query = $this->_backend->addAddCol(null, 'roles',
290 new Setup_Backend_Schema_Field_Xml('<field>
291 <name>is_deleted</name>
293 <default>false</default>
294 </field>'), 'last_modified_time'
296 $query = $this->_backend->addAddCol($query, 'roles',
297 new Setup_Backend_Schema_Field_Xml('<field>
298 <name>deleted_by</name>
301 </field>'), 'is_deleted'
303 $query = $this->_backend->addAddCol($query, 'roles',
304 new Setup_Backend_Schema_Field_Xml('<field>
305 <name>deleted_time</name>
306 <type>datetime</type>
307 </field>'), 'deleted_by'
309 $query = $this->_backend->addAddCol($query, 'roles',
310 new Setup_Backend_Schema_Field_Xml('<field>
313 <notnull>true</notnull>
315 </field>'), 'deleted_time'
317 $this->_backend->execQueryVoid($query);
318 $this->setTableVersion('roles', '2');
321 if (!$this->_backend->columnExists('state', 'applications')) {
323 $this->_backend->addCol('applications',
324 new Setup_Backend_Schema_Field_Xml('<field>
327 <length>65535</length>
328 <notnull>false</notnull>
332 $this->setTableVersion('applications', '4');
335 $this->setApplicationVersion('Tinebase', '10.8');
341 * add client row to timemachine_modlog
343 * @see 0012830: add client user agent to modlog
345 public function update_8()
347 if (! $this->_backend->columnExists('client', 'timemachine_modlog')) {
348 $declaration = new Setup_Backend_Schema_Field_Xml('<field>
352 <notnull>true</notnull>
354 $this->_backend->addCol('timemachine_modlog', $declaration);
356 $this->setTableVersion('timemachine_modlog', '5');
359 $this->setApplicationVersion('Tinebase', '10.9');
365 * adding path filter feature switch & structure update
367 public function update_9()
369 $this->dropTable('path');
371 $declaration = new Setup_Backend_Schema_Table_Xml('<table>
375 <required>mysql >= 5.6.4</required>
382 <notnull>true</notnull>
387 <length>65535</length>
388 <notnull>true</notnull>
391 <name>shadow_path</name>
393 <length>65535</length>
394 <notnull>true</notnull>
397 <name>creation_time</name>
398 <type>datetime</type>
402 <primary>true</primary>
409 <fulltext>true</fulltext>
415 <name>shadow_path</name>
416 <fulltext>true</fulltext>
418 <name>shadow_path</name>
424 $this->createTable('path', $declaration, 'Tinebase', 2);
427 $setupUser = Setup_Update_Abstract::getSetupFromConfigOrCreateOnTheFly();
429 Tinebase_Core::set(Tinebase_Core::USER, $setupUser);
430 Tinebase_Controller::getInstance()->rebuildPaths();
432 if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) {
433 Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__
434 . ' Could not find valid setupuser. Skipping rebuildPaths: you might need to run this manually.');
437 } catch (Exception $e) {
438 Tinebase_Exception::log($e);
439 Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__
440 . ' Skipping rebuildPaths: you might need to run this manually.');
443 $this->setApplicationVersion('Tinebase', '10.10');
449 * create external_fulltext table
451 public function update_10()
453 $this->_backend->createTable(new Setup_Backend_Schema_Table_Xml('<table>
454 <name>external_fulltext</name>
461 <notnull>true</notnull>
464 <name>text_data</name>
466 <length>2147483647</length>
467 <notnull>true</notnull>
471 <primary>true</primary>
477 <name>text_data</name>
478 <fulltext>true</fulltext>
480 <name>text_data</name>
484 </table>'), 'Tinebase', 'external_fulltext');
486 $this->setApplicationVersion('Tinebase', '10.11');
492 * add revision_size to tree_fileobjects
494 public function update_11()
497 if (!$this->_backend->columnExists('total_size', 'tree_fileobjects')) {
498 $declaration = new Setup_Backend_Schema_Field_Xml('<field>
499 <name>revision_size</name>
501 <notnull>true</notnull>
505 $query = $this->_backend->addAddCol('', 'tree_fileobjects', $declaration);
507 $declaration = new Setup_Backend_Schema_Field_Xml('<field>
508 <name>indexed_hash</name>
513 $query = $this->_backend->addAddCol($query, 'tree_fileobjects', $declaration);
515 $this->_backend->execQueryVoid($query);
517 $this->setTableVersion('tree_fileobjects', '4');
520 $this->setApplicationVersion('Tinebase', '10.12');
526 public function update_12()
528 if (! $this->_backend->columnExists('acl_node', 'tree_nodes')) {
529 $declaration = new Setup_Backend_Schema_Field_Xml(
531 <name>acl_node</name>
536 $query = $this->_backend->addAddCol('', 'tree_nodes', $declaration);
537 $declaration = new Setup_Backend_Schema_Field_Xml(
539 <name>revisionProps</name>
541 <length>65535</length>
543 $query = $this->_backend->addAddCol($query, 'tree_nodes', $declaration);
544 $this->_backend->execQueryVoid($query);
546 $this->setTableVersion('tree_nodes', 2);
548 $declaration = new Setup_Backend_Schema_Table_Xml('<table>
549 <name>tree_node_acl</name>
556 <notnull>true</notnull>
559 <name>record_id</name>
562 <notnull>true</notnull>
565 <name>account_type</name>
568 <default>user</default>
569 <notnull>true</notnull>
572 <name>account_id</name>
575 <notnull>true</notnull>
578 <name>account_grant</name>
581 <notnull>true</notnull>
585 <name>record_id-account-type-account_id-account_grant</name>
586 <primary>true</primary>
591 <name>record_id</name>
594 <name>account_type</name>
597 <name>account_id</name>
600 <name>account_grant</name>
604 <name>id-account_type-account_id</name>
606 <name>record_id</name>
609 <name>account_type</name>
612 <name>account_id</name>
616 <name>tree_node_acl::record_id--tree_nodes::id</name>
618 <name>record_id</name>
620 <foreign>true</foreign>
622 <table>tree_nodes</table>
624 <ondelete>cascade</ondelete>
629 $this->createTable('tree_node_acl', $declaration);
632 $this->setApplicationVersion('Tinebase', '10.13');
638 * add file revision cleanup task to scheduler
640 public function update_13()
642 $scheduler = Tinebase_Core::getScheduler();
643 Tinebase_Scheduler_Task::addFileRevisionCleanupTask($scheduler);
645 $this->setApplicationVersion('Tinebase', '10.14');
651 * update record_observer
653 public function update_14()
655 $this->dropTable('record_observer', 'Tinebase');
657 $this->createTable('record_observer', new Setup_Backend_Schema_Table_Xml('<table>
658 <name>record_observer</name>
664 <autoincrement>true</autoincrement>
667 <name>observable_model</name>
670 <notnull>true</notnull>
673 <name>observable_identifier</name>
676 <notnull>true</notnull>
679 <name>observer_model</name>
682 <notnull>true</notnull>
685 <name>observer_identifier</name>
688 <notnull>true</notnull>
691 <name>observed_event</name>
694 <notnull>true</notnull>
697 <name>created_by</name>
702 <name>creation_time</name>
703 <type>datetime</type>
704 <notnull>true</notnull>
708 <primary>true</primary>
714 <name>observable-observer-event</name>
715 <unique>true</unique>
717 <name>observable_model</name>
720 <name>observable_identifier</name>
723 <name>observer_model</name>
726 <name>observer_identifier</name>
729 <name>observed_event</name>
733 <name>observer</name>
735 <name>observer_model</name>
738 <name>observer_identifier</name>
742 </table>'), 'Tinebase', 3);
744 $this->setApplicationVersion('Tinebase', '10.15');
750 * add container xprops column
752 public function update_15()
754 if (! $this->_backend->columnExists('xprops', 'container')) {
755 $declaration = new Setup_Backend_Schema_Field_Xml(
759 <notnull>false</notnull>
760 <default>NULL</default>
763 $this->_backend->addCol('container', $declaration);
764 $this->setTableVersion('container', 12);
767 $this->setApplicationVersion('Tinebase', '10.16');
771 * update node acl: find all nodes that have containers, copy acl to node and remove container
773 * TODO allow to call from cli?
775 public function update_16()
777 // this is needed for filesystem operations
778 $this->_addRevisionPreviewCountCol();
780 $applications = Tinebase_Application::getInstance()->getApplications();
781 $setupUser = Setup_Update_Abstract::getSetupFromConfigOrCreateOnTheFly();
783 Tinebase_Core::set(Tinebase_Core::USER, $setupUser);
785 foreach ($applications as $application) {
786 if ($setupUser && ! $setupUser->hasRight($application, Tinebase_Acl_Rights::RUN)) {
787 if (Tinebase_Core::isLogLevel(Zend_Log::ERR)) {
788 Tinebase_Core::getLogger()->err(__METHOD__ . '::' . __LINE__
789 . ' Skipping ' . $application->name . ' because setupuser has no RUN right');
794 $this->_migrateAclForApplication($application, Tinebase_FileSystem::FOLDER_TYPE_PERSONAL);
795 $this->_migrateAclForApplication($application, Tinebase_FileSystem::FOLDER_TYPE_SHARED);
798 $this->setApplicationVersion('Tinebase', '10.17');
802 * @param $application
805 protected function _migrateAclForApplication($application, $type)
807 $path = Tinebase_FileSystem::getInstance()->getApplicationBasePath(
812 $parentNode = Tinebase_FileSystem::getInstance()->stat($path);
813 } catch (Tinebase_Exception_NotFound $tenf) {
817 $childNodes = Tinebase_FileSystem::getInstance()->getTreeNodeChildren($parentNode);
819 if (count($childNodes) === 0) {
820 if (Tinebase_Core::isLogLevel(Zend_Log::INFO)) Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__
821 . " No container nodes found for application " . $application->name);
825 if (Tinebase_Core::isLogLevel(Zend_Log::INFO)) Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__
826 . ' ' . count($childNodes) . " nodes found for application " . $application->name);
828 if ($type === Tinebase_FileSystem::FOLDER_TYPE_PERSONAL) {
829 foreach ($childNodes as $accountNode) {
830 $personalNodes = Tinebase_FileSystem::getInstance()->getTreeNodeChildren($accountNode);
831 $this->_moveAclFromContainersToNodes($personalNodes);
835 $this->_moveAclFromContainersToNodes($childNodes);
840 * @param Tinebase_Record_RecordSet $nodes
844 protected function _moveAclFromContainersToNodes(Tinebase_Record_RecordSet $nodes)
846 foreach ($nodes as $node) {
848 $container = Tinebase_Container::getInstance()->getContainerById($node->name);
849 } catch (Tinebase_Exception_NotFound $tenf) {
852 } catch (Tinebase_Exception_InvalidArgument $teia) {
856 //print_r($container->toArray());
857 if ($container->model === 'HumanResources_Model_Employee') {
858 // fix broken HR template container to prevent problems when removing data
859 $container->model = 'Tinebase_Model_Tree_Node';
860 Tinebase_Container::getInstance()->update($container);
863 // set container acl in node
864 $grants = Tinebase_Container::getInstance()->getGrantsOfContainer($container, /* ignore acl */ true);
865 Tinebase_FileSystem::getInstance()->setGrantsForNode($node, $grants);
867 // set container name in node
868 $node->name = $container->name;
869 // check if node exists and if yes: attach uid
870 $parentNode = Tinebase_FileSystem::getInstance()->get($node->parent_id);
871 $parentPath = Tinebase_FileSystem::getInstance()->getPathOfNode($parentNode, true);
872 if (Tinebase_FileSystem::getInstance()->fileExists($parentPath . '/' . $node->name)) {
873 $node->name .= ' ' . Tinebase_Record_Abstract::generateUID(8);
876 $node->acl_node = $node->getId();
877 Tinebase_FileSystem::getInstance()->update($node);
878 if (Tinebase_Core::isLogLevel(Zend_Log::INFO)) Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__
879 . ' Updated node acl for ' . $node->name .' (container id: ' . $container->getId() . ')');
881 // remove old acl container
882 Tinebase_Container::getInstance()->deleteContainer($container, /* ignore acl */ true);
883 if (Tinebase_Core::isLogLevel(Zend_Log::INFO)) Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__
884 . ' Removed old container ' . $container->name);
891 * Add fulltext index for description field
893 public function update_17()
895 $declaration = new Setup_Backend_Schema_Index_Xml('
897 <name>description</name>
898 <fulltext>true</fulltext>
900 <name>description</name>
905 $this->_backend->addIndex('tree_fileobjects', $declaration);
907 $this->setTableVersion('tree_fileobjects', '5');
908 $this->setApplicationVersion('Tinebase', '10.18');
914 * Add fulltext search index for tags description
916 public function update_18()
918 $declaration = new Setup_Backend_Schema_Index_Xml('
920 <name>description</name>
921 <fulltext>true</fulltext>
923 <name>description</name>
929 $this->_backend->dropIndex('tags', 'description');
930 } catch (Exception $e) {
931 // Ignore, if there is no index, we can just go on and create one.
934 $this->_backend->addIndex('tags', $declaration);
936 $this->setTableVersion('tags', 8);
937 $this->setApplicationVersion('Tinebase', '10.19');
943 * Make tags description a longtext field
945 public function update_19()
947 $declaration = new Setup_Backend_Schema_Field_Xml('
949 <name>description</name>
951 <length>2147483647</length>
953 <default>NULL</default>
957 $this->_backend->alterCol('tags', $declaration);
959 $this->setTableVersion('tags', 9);
960 $this->setApplicationVersion('Tinebase', '10.20');
966 * add new file system tasks to scheduler
968 public function update_20()
970 $scheduler = Tinebase_Core::getScheduler();
971 Tinebase_Scheduler_Task::addFileSystemSizeRecalculation($scheduler);
972 Tinebase_Scheduler_Task::addFileSystemCheckIndexTask($scheduler);
974 $this->setApplicationVersion('Tinebase', '10.21');
980 * add favorite column to importexport_definition
982 public function update_21()
984 if (! $this->_backend->columnExists('favorite', 'importexport_definition')) {
985 $declaration = new Setup_Backend_Schema_Field_Xml('<field>
986 <name>icon_class</name>
990 $this->_backend->addCol('importexport_definition', $declaration);
992 $declaration = new Setup_Backend_Schema_Field_Xml('
994 <name>favorite</name>
997 $this->_backend->addCol('importexport_definition', $declaration);
999 $declaration = new Setup_Backend_Schema_Field_Xml('<field>
1001 <type>integer</type>
1002 <notnull>true</notnull>
1003 <default>0</default>
1005 $this->_backend->addCol('importexport_definition', $declaration);
1007 $this->setTableVersion('importexport_definition', 9);
1010 $this->setApplicationVersion('Tinebase', '10.22');
1016 * add preview_count column to tree_filerevisions
1018 public function update_22()
1020 $this->_addRevisionPreviewCountCol();
1021 $this->setApplicationVersion('Tinebase', '10.23');
1024 protected function _addRevisionPreviewCountCol()
1026 if (! $this->_backend->columnExists('preview_count', 'tree_filerevisions')) {
1027 $declaration = new Setup_Backend_Schema_Field_Xml(
1029 <name>preview_count</name>
1030 <type>integer</type>
1032 <notnull>true</notnull>
1033 <default>0</default>
1035 $this->_backend->addCol('tree_filerevisions', $declaration);
1036 $this->setTableVersion('tree_filerevisions', 2);
1043 * 0013032: add GRANT_DOWNLOAD
1044 * 0013034: add GRANT_PUBLISH
1046 public function update_23()
1048 $this->_addNotificationProps();
1050 // get all folder nodes with own acl
1051 $searchFilter = new Tinebase_Model_Tree_Node_Filter(array(
1054 'operator' => 'equals',
1055 'value' => Tinebase_Model_Tree_FileObject::TYPE_FOLDER
1057 ), Tinebase_Model_Filter_FilterGroup::CONDITION_AND, array('ignoreAcl' => true));
1058 $folders = Tinebase_FileSystem::getInstance()->searchNodes($searchFilter);
1060 foreach ($folders as $folder) {
1061 if ($folder->acl_node === $folder->getId()) {
1062 $grants = Tinebase_FileSystem::getInstance()->getGrantsOfContainer($folder, /* ignoreAcl */ true);
1063 foreach ($grants as $grant) {
1064 // add download & publish for admins and only download for the rest
1065 if ($grant->{Tinebase_Model_Grants::GRANT_ADMIN}) {
1066 $grant->{Tinebase_Model_Grants::GRANT_DOWNLOAD} = true;
1067 $grant->{Tinebase_Model_Grants::GRANT_PUBLISH} = true;
1069 $grant->{Tinebase_Model_Grants::GRANT_DOWNLOAD} = true;
1072 Tinebase_FileSystem::getInstance()->setGrantsForNode($folder, $grants);
1077 if (Tinebase_Core::isLogLevel(Zend_Log::INFO)) Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__
1078 . ' Added DOWNLOAD & PUBLISH grants to ' . $updateCount . ' folder nodes');
1080 $this->setApplicationVersion('Tinebase', '10.24');
1086 * add notification props
1088 public function update_24()
1090 $this->_addNotificationProps();
1091 $this->setApplicationVersion('Tinebase', '10.25');
1094 protected function _addNotificationProps()
1096 if (! $this->_backend->columnExists('notificationProps', 'tree_nodes')) {
1097 $declaration = new Setup_Backend_Schema_Field_Xml(
1099 <name>notificationProps</name>
1101 <length>65535</length>
1104 $this->_backend->addCol('tree_nodes', $declaration);
1105 $this->setTableVersion('tree_nodes', 3);
1112 * add scope column to importexport_definition
1114 public function update_25()
1116 if (! $this->_backend->columnExists('scope', 'importexport_definition')) {
1117 $declaration = new Setup_Backend_Schema_Field_Xml('<field>
1120 <length>255</length>
1122 $this->_backend->addCol('importexport_definition', $declaration);
1124 $this->setTableVersion('importexport_definition', 10);
1127 $this->setApplicationVersion('Tinebase', '10.26');
1133 * change role_accounts id to uuid
1135 public function update_26()
1137 $declaration = new Setup_Backend_Schema_Field_Xml('<field>
1142 $this->_backend->alterCol('role_accounts', $declaration);
1144 $this->setTableVersion('role_accounts', 4);
1145 $this->setApplicationVersion('Tinebase', '10.27');
1151 * add scope column to importexport_definition
1153 public function update_27()
1155 if (! $this->_backend->columnExists('format', 'importexport_definition')) {
1156 $declaration = new Setup_Backend_Schema_Field_Xml('<field>
1159 <length>255</length>
1161 $this->_backend->addCol('importexport_definition', $declaration);
1163 $this->setTableVersion('importexport_definition', 11);
1166 $this->setApplicationVersion('Tinebase', '10.28');
1172 * add scope column to importexport_definition
1174 public function update_28()
1176 foreach (Tinebase_Application::getInstance()->getApplications() as $application) {
1177 Setup_Controller::getInstance()->createImportExportDefinitions($application);
1180 $this->setApplicationVersion('Tinebase', '10.29');