The table archive has a the old fields archive.ar_text/archive.ar_flags. Before removing that fields (T33223) a maintenance script is needed to move the text to the text table.
Calling Revision::newFromArchiveRow for each row with archive.ar_text_id IS NULL to extract the text with all flags.
But no idea how MediaWiki saves the text back to the right table and cleaning up the archive table, because we do not do undeletion (In that case Revision::insertOn does the work).
See Also: T24624: Corruption of archive text due to deletion in late 2004