1.1 KiB
1.1 KiB
SMW::SQLStore::Installer::BeforeCreateTablesComplete
- Since: 3.1
- Description: Hook to add additional table indices.
- Reference class:
Installer.php
When using this hook, please make sure you understand the implications of modifying the standard table definition (e.g add auxiliary indices) which are not part of the core declaration and may alter performance expectations.
Signature
use MediaWiki\MediaWikiServices;
use Onoi\MessageReporter\MessageReporter;
MediaWikiServices::getInstance()->getHookContainer()->register( 'SMW::SQLStore::Installer::BeforeCreateTablesComplete', function( array $tables, $messageReporter ) {
// Modify the table definitions
} );
See also
hook.sqlstore.installer.beforecreatetablescompletecontains an example on how to modify table definitions (e.g. adding additional indices)