Bootstrap::initializeBackendAuthentication();
$this->upgradeWizardsService = new UpgradeWizardsService();
$this->upgradeWizardsService->isDatabaseCharsetUtf8() ?: $this->upgradeWizardsService->setDatabaseCharsetUtf8();
- $this->upgradeWizardsService->silentCacheFrameworkTableSchemaMigration();
}
/**
}
/**
- * Execute silent database field adds like cache framework tables
- *
- * @return ResponseInterface
- */
- public function upgradeWizardsSilentUpgradesAction(): ResponseInterface
- {
- $this->loadExtLocalconfDatabaseAndExtTables();
- // Perform silent cache framework table upgrade
- $upgradeWizardsService = new UpgradeWizardsService();
- $statements = $upgradeWizardsService->silentCacheFrameworkTableSchemaMigration();
- $messages = new FlashMessageQueue('install');
- if (!empty($statements)) {
- $messages->enqueue(new FlashMessage(
- '',
- 'Created some database cache tables.'
- ));
- }
- return new JsonResponse([
- 'success' => true,
- 'status' => $messages,
- ]);
- }
-
- /**
* Initialize the core upgrade actions
*
* @throws \RuntimeException
use Doctrine\DBAL\Schema\Table;
use Symfony\Component\Console\Output\Output;
use Symfony\Component\Console\Output\StreamOutput;
-use TYPO3\CMS\Core\Cache\DatabaseSchemaService;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
use TYPO3\CMS\Core\Database\Schema\SqlReader;
}
/**
- * Force creation / update of caching framework tables that are needed by some update wizards
- *
- * @return array List of executed statements
- */
- public function silentCacheFrameworkTableSchemaMigration(): array
- {
- $sqlReader = GeneralUtility::makeInstance(SqlReader::class);
- $cachingFrameworkDatabaseSchemaService = GeneralUtility::makeInstance(DatabaseSchemaService::class);
- $createTableStatements = $sqlReader->getStatementArray(
- $cachingFrameworkDatabaseSchemaService->getCachingFrameworkRequiredDatabaseSchema()
- );
- $statements = [];
- if (!empty($createTableStatements)) {
- $schemaMigrationService = GeneralUtility::makeInstance(SchemaMigrator::class);
- $statements = $schemaMigrationService->install($createTableStatements);
- }
- return $statements;
- }
-
- /**
* @return array List of wizards marked as done in registry
*/
public function listOfWizardsDone(): array
success: function (data) {
if (data.success === true) {
modalContent.empty().append(data.html);
- self.silentUpgrades();
- } else {
- Notification.error('Something went wrong');
- }
- },
- error: function (xhr) {
- Router.handleAjaxError(xhr);
- }
- });
- },
-
- silentUpgrades: function () {
- var self = this;
- var $outputContainer = this.currentModal.find(this.selectorOutputWizardsContainer);
- $outputContainer.empty().html(this.renderProgressBar('Executing some silent upgrades...'));
- $.ajax({
- url: Router.getUrl('upgradeWizardsSilentUpgrades'),
- cache: false,
- success: function (data) {
- if (data.success === true && Array.isArray(data.status)) {
- if (data.status.length > 0) {
- data.status.forEach((function (element) {
- var message = InfoBox.render(element.severity, element.title, element.message);
- $outputContainer.append(message);
- }));
- }
self.blockingUpgradesDatabaseCharsetTest();
} else {
Notification.error('Something went wrong');