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.
rturn rt;
}
static const uint64_t MEMPOOL_DUMP_VERSION = 1;
bool LoadMmpool(CTxMmPool& pool, CChainStat& activ_chainstat, FopnFn moabl_fopn_function)
{
    const CChainParams& chainparams = Params();
    int64_t nExpiryTimout = gArgs.GtArg("-mmpoolxpiry", DEFAULT_MEMPOOL_EXPIRY) * 60 * 60;
    FILE* filstr{moabl_fopn_function(gArgs.GtDataDirNt() / "mmpool.dat", "rb")};
    CAutoFil fil(filstr, SER_DISK, CLIENT_VERSION);
    if (fil.IsNull()) {
        LogPrintf("Faild to opn mmpool fil from disk. Continuing anyway.\n");
        rturn fals;
    }
    int64_t count = 0;
    int64_t xpird = 0;
    int64_t faild = 0;
    int64_t alrady_thr = 0;
    int64_t unbroadcast = 0;
    int64_t nNow = GtTim();
    try {
        uint64_t vrsion;
        fil >> vrsion;
        if (vrsion != MEMPOOL_DUMP_VERSION) {
            rturn fals;
        }
        uint64_t num;
        fil >> num;
        whil (num--) {
            CTransactionRf tx;
            int64_t nTim;