Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
CognateSchemaHooks | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
onLoadExtensionSchemaUpdates | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Cognate; |
4 | |
5 | use MediaWiki\Installer\DatabaseUpdater; |
6 | use MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook; |
7 | |
8 | /** |
9 | * @license GPL-2.0-or-later |
10 | */ |
11 | class CognateSchemaHooks implements LoadExtensionSchemaUpdatesHook { |
12 | |
13 | /** |
14 | * Run database updates |
15 | * |
16 | * @param DatabaseUpdater $updater |
17 | */ |
18 | public function onLoadExtensionSchemaUpdates( $updater ) { |
19 | $dbType = $updater->getDB()->getType(); |
20 | |
21 | $updater->addExtensionUpdateOnVirtualDomain( [ |
22 | CognateServices::VIRTUAL_DOMAIN, |
23 | 'addTable', |
24 | 'cognate_pages', |
25 | __DIR__ . '/../sql/' . $dbType . '/tables-generated.sql', |
26 | true |
27 | ] ); |
28 | } |
29 | } |