When the virtual domains mapping config indicates that the local DB should be used using the config value [ 'db' => false ], the SchemaChangesHandler.php file does not recognise that the local DB should be used. When this config is undefined, the update handler works as intended.
This was found by @Djackson-ctr as part of QA'ing other tickets. This fix is needed to QA those tickets.
Steps to replicate the issue
- Define $wgVirtualDomainsMapping['virtual-mediamoderation'] = [ 'db' => false ]; in your LocalSettings.php
- Add MediaModeration to the wiki
- Run update.php
What happens?:
The output of the maintenance script has the text Unable to perform DB updates for MediaModeration as the table is on an virtual database domain.
What should have happened instead?:
No such text should appear and the database table mediamoderation_scan should be added to the local wiki's DB.
Software version
MediaWiki 1.42.0-alpha (5a624a4) 07:56, 14 November 2023. MediaModeration 0.1.0 (78a3f62) 18:45, 19 November 2023.