gplx/mediawiki/extensions/SemanticMediaWiki/docs/technical/hooks/hook.sqlstore.installer.bef...

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