Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| FlaggedRevsUpdaterHooks | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| onLoadExtensionSchemaUpdates | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | use MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook; |
| 4 | |
| 5 | /** |
| 6 | * Class containing updater functions for a FlaggedRevs environment |
| 7 | */ |
| 8 | class FlaggedRevsUpdaterHooks implements |
| 9 | LoadExtensionSchemaUpdatesHook |
| 10 | { |
| 11 | |
| 12 | /** |
| 13 | * @inheritDoc |
| 14 | */ |
| 15 | public function onLoadExtensionSchemaUpdates( $du ) { |
| 16 | $dbType = $du->getDB()->getType(); |
| 17 | |
| 18 | // Initial install tables (current schema) |
| 19 | $du->addExtensionTable( 'flaggedrevs', __DIR__ . "/$dbType/tables-generated.sql" ); |
| 20 | |
| 21 | // 1.42 |
| 22 | $du->dropExtensionTable( 'flaggedtemplates' ); |
| 23 | $du->dropExtensionTable( 'flaggedpage_pending' ); |
| 24 | |
| 25 | // 1.45 |
| 26 | $du->dropExtensionTable( 'flaggedrevs_tracking' ); |
| 27 | } |
| 28 | } |