Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
SchemaChangesHandler | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
onLoadExtensionSchemaUpdates | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare( strict_types=1 ); |
4 | |
5 | namespace MediaWiki\Extension\WikimediaCampaignEvents\Hooks\Handlers; |
6 | |
7 | use MediaWiki\Extension\CampaignEvents\Utils; |
8 | use MediaWiki\Installer\DatabaseUpdater; |
9 | use MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook; |
10 | |
11 | class SchemaChangesHandler implements LoadExtensionSchemaUpdatesHook { |
12 | /** |
13 | * @param DatabaseUpdater $updater |
14 | */ |
15 | public function onLoadExtensionSchemaUpdates( $updater ) { |
16 | $dbType = $updater->getDB()->getType(); |
17 | $dir = __DIR__ . "/../../../db_patches"; |
18 | |
19 | $updater->addExtensionUpdateOnVirtualDomain( [ |
20 | Utils::VIRTUAL_DB_DOMAIN, |
21 | 'addTable', |
22 | 'wikimedia_campaign_events_grant', |
23 | "$dir/$dbType/tables-generated.sql", |
24 | true |
25 | ] ); |
26 | } |
27 | } |