mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-22 12:53:35 +00:00
0024a94ba7
Depends-On: I90656cc74bb1cb1f2f3c82ad51cfb164cb8a4a4b Bug: T296801 Change-Id: I84187b303aa10a242c872088403f808df3d1f940
39 lines
862 B
PHP
39 lines
862 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"
|
|
);
|
|
$updater->addExtensionTable(
|
|
'discussiontools_items',
|
|
"$base/../sql/$type/discussiontools_persistent.sql"
|
|
);
|
|
}
|
|
}
|