mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-18 11:02:57 +00:00
5b8646f73f
Bug: T264885 Change-Id: I92d0362eac80ae1ae70839e26e2c084003862a5f
35 lines
743 B
PHP
35 lines
743 B
PHP
<?php
|
|
/**
|
|
* DiscussionTools installer hooks
|
|
*
|
|
* @file
|
|
* @ingroup Extensions
|
|
* @license MIT
|
|
*/
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Hooks;
|
|
|
|
use DatabaseUpdater;
|
|
use MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook;
|
|
|
|
class InstallerHooks implements
|
|
LoadExtensionSchemaUpdatesHook
|
|
{
|
|
/**
|
|
* Implements the LoadExtensionSchemaUpdates hook, to create database tables when
|
|
* update.php runs
|
|
*
|
|
* @param DatabaseUpdater $updater
|
|
* @return bool|void
|
|
*/
|
|
public function onLoadExtensionSchemaUpdates( $updater ) {
|
|
$base = dirname( __DIR__ );
|
|
$type = $updater->getDB()->getType();
|
|
|
|
$updater->addExtensionTable(
|
|
'discussiontools_subscription',
|
|
"$base/../sql/$type/discussiontools_subscription.sql"
|
|
);
|
|
}
|
|
}
|