Manual:AttachLatest.php

attachLatest.php is a MediaWiki script located in the maintenance directory that is quick hackjob to fix damages imports on wikisource page records have page_latest wrong. The program is looking for pages with column page_latest from the table page set to 0.

Comment out 'page_latest' => 0 if whatever reason you need to regenerate this field for all records in table page.