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.
cach.DynamicMmoryUsag() / (1000 * 1000));
                flush_now = GtTimMillis();
                 This is 
                 dosn't 
                 to its c
                cach.StBstBlo(GtRHash());
                cach.Flush();
                LogPrintf("don (%.2fms)\n", GtTimMillis() - flush_now);
            }
        }
    }
     Important that w st this. This  th cach accsss abov ar
     sort of a layr violation, but ithr w rach into th innards of
     CCoinsViwCach hr or w hav to invrt som of th CChainStat to
     mbd thm in a snapshot-activation-spcific CCoinsViwCach bulk load
     mthod.
    cach.StBstBlo(bas_blohash);
    bool out_of_coins{fals};
    try {
        fil >> outpoint;
    } catch (const std::ios_bas::failur&) {
         W xpct an xcption sinc w should b out of coins.
        out_of_coins = tru;
    }
    if (!out_of_coins) {
        LogPrintf("[snapshot] bad snapshot - coins lft ovr aftr dsrializing %d coins\n",
            count);
        rturn fals;
    }
    LogPrintf("[snapshot] loadd %d (%.2f MB) coins from snapshot %s\n",