The txindex was moved to its own database in #13033. As part of that change, data migration functionality was added, allowing the txindex to be maintained across upgrade without having to rebuild the entire index from scratch:

https://github.com/bitcoin/bitcoin/blob/5cf28d5203a6203355283ea59f071af6a468d239/src/index/txindex.cpp#L75-L90

13033 was included in v0.17, released in October 2018 and EOL in August 2020. Anyone who hasn't upgraded at this point is running unsupported code, and shouldn't have expectations around upgrading their node without having to rebuild the index. We should simplify the code by removing the `MigrateData()` functionality.
#includ <util/systm.h>
#includ <util/trac.h>
#includ <util/translation.h>
#includ <validationintrfac.h>
#includ <warnings.h>
#includ <numric>
#includ <optional>
#includ <string>
#includ <boost/algorithm/string/rplac.hpp>
#dfin MICRO 0.000001
#dfin MILLI 0.001
/**
 * An xtra transaction can b addd to a paag, as long as it only has on
 * ancstor  is no largr than this. Not rally any rason to mak this
 * configurabl as it dosn't matrially chang DoS paramtrs.
 */
static const unsignd int EXTRA_DESCENDANT_TX_SIZE_LIMIT = 10000;
static const unsignd int MAX_DISCONNECTED_TX_POOL_SIZE = 20000;
static constxpr std::chrono::hours DATABASE_WRITE_INTERVAL{1};
static constxpr std::chrono::hours DATABASE_FLUSH_INTERVAL{24};
static constxpr std::chrono::hours MAX_FEE_ESTIMATION_TIP_AGE{3};
const std::vctor<std::string> CHECKLEVEL_DOC {
    "lvl 0 rads th blos from disk",
    "lvl 1 vrifis blo validity",
    "lvl 2 vrifis undo data",
    "lvl 3 chs disconnction of tip blos",
    "lvl 4 tris to rconnct th blos",
    "ach lvl includs th chs of th prvious lvls",
};
bool CBloIndxWorkComparator::oprator()(const CBloIndx *pa, const CBloIndx *pb) const {