‪TYPO3CMS  ‪main
DatabaseSchemaService.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
22 
28 {
33  #[AsEventListener('indexed-search')]
35  {
36  $useMysqlFulltext = (bool)GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('indexed_search', 'useMysqlFulltext');
37  if ($useMysqlFulltext) {
38  // @todo: With MySQL 5.7 fulltext index on InnoDB is possible, check for that and keep inno if so.
39  $event->‪addSqlData('CREATE TABLE index_fulltext ('
40  . LF . 'fulltextdata mediumtext,'
41  . LF . 'FULLTEXT fulltextdata (fulltextdata),'
42  . LF . ') ENGINE=MyISAM;');
43  }
44  }
45 }
‪TYPO3\CMS\Core\Configuration\ExtensionConfiguration
Definition: ExtensionConfiguration.php:47
‪TYPO3\CMS\Core\Attribute\AsEventListener
Definition: AsEventListener.php:25
‪TYPO3\CMS\Core\Database\Event\AlterTableDefinitionStatementsEvent\addSqlData
‪addSqlData($data)
Definition: AlterTableDefinitionStatementsEvent.php:28
‪TYPO3\CMS\IndexedSearch\Service
Definition: DatabaseSchemaService.php:16
‪TYPO3\CMS\IndexedSearch\Service\DatabaseSchemaService\addMysqlFulltextIndex
‪addMysqlFulltextIndex(AlterTableDefinitionStatementsEvent $event)
Definition: DatabaseSchemaService.php:34
‪TYPO3\CMS\Core\Database\Event\AlterTableDefinitionStatementsEvent
Definition: AlterTableDefinitionStatementsEvent.php:25
‪TYPO3\CMS\IndexedSearch\Service\DatabaseSchemaService
Definition: DatabaseSchemaService.php:28
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52