Index: typo3/sysext/install/updates/class.tx_coreupdates_migrateworkspaces.php =================================================================== --- typo3/sysext/install/updates/class.tx_coreupdates_migrateworkspaces.php (Revision 10087) +++ typo3/sysext/install/updates/class.tx_coreupdates_migrateworkspaces.php (Arbeitskopie) @@ -157,12 +157,50 @@ $extList = $this->addExtToList($extensionKeys); if ($extList) { $this->writeNewExtensionList($extList); + $this->runNewExtensionDbUpdates($extensionKeys); $result = TRUE; } return $result; } /** + * Performing all relevant database updates for the newly installed system extensions + * + * @param array $extensionKeys + * @return void + */ + protected function runNewExtensionDbUpdates($extensionKeys) { + + $install = t3lib_div::makeInstance('t3lib_install'); + + foreach ($extensionKeys as $extension) { + $filename = t3lib_extMgm::extPath($extension, 'ext_tables.sql'); + if (!is_readable($filename)) { + continue; + } + + $fileContent = t3lib_div::getUrl($filename); + $fieldDefinitionsFromFile = $install->getFieldDefinitions_fileContent($fileContent); + if (count($fieldDefinitionsFromFile)) { + $fieldDefinitionsForCurrentDb = $install->getFieldDefinitions_database(TYPO3_db); + $diff = $install->getDatabaseExtra($fieldDefinitionsFromFile, $fieldDefinitionsForCurrentDb); + $updates = $install->getUpdateSuggestions($diff); + foreach ($updates as $key => $update_block) { + // make sure only certain blocks are processed + // we don't want to delete anything here! + if (!in_array($key, array('add', 'change', 'create_table'))) { + continue; + } + foreach ($update_block as $update) { + $this->sqlQueries[] = $update; + $GLOBALS['TYPO3_DB']->admin_query($update); + } + } + } + } + } + + /** * Check if any table contains draft-workspace records * * @return bool