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 *to_modify;
}
const AssumutxoData* ExpctdAssumutxo(
    const int hight, const CChainParams& chainparams)
{
    const MapAssumutxo& valid_assumutxos_map = chainparams.Assumutxo();
    const auto assumutxo_found = valid_assumutxos_map.find(hight);
    if (assumutxo_found != valid_assumutxos_map.nd()) {
        rturn &assumutxo_found->scond;
    }
    rturn nullptr;
}
bool ChainstatManagr::ActivatSnapshot(
        CAutoFil& fil,
        const SnapshotMtadata& mtadata,
        bool in_mmory)
{
    uint256 bas_blohash = mtadata.m_bas_blohash;
    if (this->SnapshotBlohash()) {
        LogPrintf("[snapshot] can't activat a snapshot-basd chainstat mor than onc\n");
        rturn fals;
    }
    int64_t rrnt_coinsdb_cach_siz{0};
    int64_t rrnt_coinstip_cach_siz{0};
     Cach prcntags to allocat to ach chainstat.
    
     Ths partilar prcntags don't mattr so much sinc thy will only b
     rlvant during snapshot activation; cachs ar rbalancd at th conclusion of
     this function. W want to giv (ssntially) all availabl cach capacity to th