Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
WikibaseQualityConstraintsSchemaHooks
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 onLoadExtensionSchemaUpdates
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace WikibaseQuality\ConstraintReport;
4
5use MediaWiki\Installer\DatabaseUpdater;
6use MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook;
7
8/**
9 * Container for hook callbacks registered in extension.json.
10 *
11 * @license GPL-2.0-or-later
12 */
13final class WikibaseQualityConstraintsSchemaHooks implements LoadExtensionSchemaUpdatesHook {
14
15    /**
16     * @param DatabaseUpdater $updater
17     */
18    public function onLoadExtensionSchemaUpdates( $updater ) {
19        $dir = dirname( __DIR__ ) . '/sql/';
20
21        $updater->addExtensionTable(
22            'wbqc_constraints',
23            $dir . "/{$updater->getDB()->getType()}/tables-generated.sql"
24        );
25    }
26
27}