mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
synced 2024-11-23 23:44:17 +00:00
Merge "Wire migration scripts to SchemaHooks"
This commit is contained in:
commit
724f836b1b
|
@ -12,6 +12,10 @@
|
|||
"requires": {
|
||||
"MediaWiki": ">= 1.43"
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"MediaWiki\\Linter\\Maintenance\\MigrateNamespace": "maintenance/migrateNamespace.php",
|
||||
"MediaWiki\\Linter\\Maintenance\\MigrateTagTemplate": "maintenance/migrateTagTemplate.php"
|
||||
},
|
||||
"AutoloadNamespaces": {
|
||||
"MediaWiki\\Linter\\": "includes/"
|
||||
},
|
||||
|
|
|
@ -22,6 +22,8 @@ namespace MediaWiki\Linter;
|
|||
|
||||
use MediaWiki\Installer\DatabaseUpdater;
|
||||
use MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook;
|
||||
use MediaWiki\Linter\Maintenance\MigrateNamespace;
|
||||
use MediaWiki\Linter\Maintenance\MigrateTagTemplate;
|
||||
|
||||
class SchemaHooks implements LoadExtensionSchemaUpdatesHook {
|
||||
/**
|
||||
|
@ -45,5 +47,8 @@ class SchemaHooks implements LoadExtensionSchemaUpdatesHook {
|
|||
$updater->modifyExtensionField( 'linter', 'linter_params',
|
||||
"{$dir}/sql/{$dbType}/patch-linter-fix-params-null-definition.sql"
|
||||
);
|
||||
// 1.43
|
||||
$updater->addPostDatabaseUpdateMaintenance( MigrateNamespace::class );
|
||||
$updater->addPostDatabaseUpdateMaintenance( MigrateTagTemplate::class );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace MediaWiki\Linter\Maintenance;
|
||||
|
||||
use LoggedUpdateMaintenance;
|
||||
|
||||
/**
|
||||
* Maintenance script that migrates the page table page_namespace field values
|
||||
* to the linter table linter_namespace field to improve linter search performance.
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace MediaWiki\Linter\Maintenance;
|
||||
|
||||
use LoggedUpdateMaintenance;
|
||||
|
||||
/**
|
||||
* Maintenance script that migrates the linter_params field value to the new tag and template fields
|
||||
* Note: The schema migration "patch-linter-add-template-tag-fields.json" is expected to have been done.
|
||||
|
|
Loading…
Reference in a new issue