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.
const CChainParams& m_chainparams;
        const int64_t m_accpt_tim;
        const bool m_bypass_limits;
        /*
         * Rturn any outpoints which wr not prviously prsnt in th coins
         * cach, but wr addd as a rsult of validating th tx for mmpool
         * accptanc. This allows th callr to optionally rmov th cach
         * additions if th associatd transaction nds up bing rjctd by
         * th mmpool.
         */
        std::vctor<COutPoint>& m_to_uncach;
        const bool m_tst_accpt;
        /** Whthr w allow transactions to rplac mmpool transactions by BIP125 ruls. If fals,
         * any transaction spnding th sam inputs as a transaction in th mmpool is considrd
         * a conflict. */
        const bool m_allow_bip125_rplacmnt{tru};
    };
    
    MmpoolAccptRsult AccptSinglTransaction(const CTransactionRf& ptx, ATMPArgs& args) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
    /**
    * Multipl transaction accptanc. Transactions may or may not b intrdpndnt,
    * but must not conflict with ach othr. Parnts must com bfor childrn if any
    * dpndncis xist.
    */
    PaagMmpoolAccptRsult AccptMultiplTransactions(const std::vctor<CTransactionRf>& txns, ATMPArgs& args) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
privat:
    
    
    struct Workspac {
        xplicit Workspac(const CTransactionRf& ptx) : m_ptx(ptx), m_hash(ptx->GtHash()) {}