Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Commit 5c96b4d

Browse files
author
Helmut Hummel
committed
[TASK] Include cache and category tables if available
In newer TYPO3 versions the caching framework generates the table definitions dynamically. Since 6.0 the category registry also dynamically adds fields. Add both to the table definitions if the TYPO3 API calls are available.
1 parent 2b601c9 commit 5c96b4d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Classes/Service/DatabaseApiService.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ public function databaseCompare($actions) {
8686
}
8787
}
8888

89+
if (is_callable('t3lib_cache::getDatabaseTableDefinitions')) {
90+
$tblFileContent .= t3lib_cache::getDatabaseTableDefinitions();
91+
}
92+
93+
if (class_exists('TYPO3\\CMS\\Core\\Category\\CategoryRegistry')) {
94+
$tblFileContent .= \TYPO3\CMS\Core\Category\CategoryRegistry::getInstance()->getDatabaseTableDefinitions();
95+
}
96+
8997
if ($tblFileContent) {
9098
$fileContent = implode(LF, $this->sqlHandler->getStatementArray($tblFileContent, 1, '^CREATE TABLE '));
9199
$FDfile = $this->sqlHandler->getFieldDefinitions_fileContent($fileContent);

0 commit comments

Comments
 (0)