As identified in T200653, missing/empty rev_sha1 and content_sha1 values can cause various problems. Ensure that, between populateRevisionSha1.php script and populateContentTables.php, these values are populated. Or else if for some reason they cannot be populated, inform the user and provide helpful instructions.
populateRevisionSha1.php may be run in two situations:
- initialize the rev_sha1 field for wikis being upgraded from a schema without that field, which was added in MediaWiki 1.19
- fix missing rev_sha1 data on wikis that have already been upgraded
populateContentTables.php may be run in two situations:
- initialize MCR content-related data for wikis being upgraded to an MCR schema
- fix missing content-related data for wikis that have already been upgraded
There are some interdependencies to be aware of:
- populateContentTables.php requires rev_sha1 to have been initialized
- populateRevisionSha1.php requires access to the content, which for certain MCR stages requires the content and slot tables to have been initialized
populateRevisionSha1.php currently uses deprecated functions. These should be refactored.