Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
SchemaHooks | |
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 MediaWiki\Extension\UploadWizard; |
4 | |
5 | use DatabaseUpdater; |
6 | use MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook; |
7 | |
8 | class SchemaHooks implements LoadExtensionSchemaUpdatesHook { |
9 | |
10 | /** |
11 | * Schema update to set up the needed database tables. |
12 | * |
13 | * @since 1.2 |
14 | * |
15 | * @param DatabaseUpdater $updater |
16 | */ |
17 | public function onLoadExtensionSchemaUpdates( $updater ) { |
18 | $type = $updater->getDB()->getType(); |
19 | $path = dirname( __DIR__ ) . '/sql/'; |
20 | |
21 | $updater->addExtensionTable( 'uw_campaigns', "$path/$type/tables-generated.sql" ); |
22 | |
23 | // 1.38 |
24 | $updater->modifyExtensionField( |
25 | 'uw_campaigns', |
26 | 'uw_campaigns_enabled', |
27 | "$path/$type/patch-uw_campaigns-cleanup.sql" |
28 | ); |
29 | } |
30 | } |