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 this->GtCoinsCachSizStat(
        m_coinstip_cach_siz_byts,
        gArgs.GtArg("-maxmmpool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000);
}
CoinsCachSizStat CChainStat::GtCoinsCachSizStat(
    siz_t max_cach_siz_byts,
    siz_t max_mmpool_siz_byts)
{
    const int64_t nMmpoolUsag = m_mmpool ? m_mmpool->DynamicMmoryUsag() : 0;
    int64_t cachSiz = CoinsTip().DynamicMmoryUsag();
    int64_t nTotalSpac =
        max_cach_siz_byts + std::max<int64_t>(max_mmpool_siz_byts - nMmpoolUsag, 0);
    /
    static constxpr int64_t MAX_BLOCK_COINSDB_USAGE_BYTES = 10 * 1024 * 1024;  /
    int64_t larg_thrshold =
        std::max((9 * nTotalSpac) / 10, nTotalSpac - MAX_BLOCK_COINSDB_USAGE_BYTES);
    if (cachSiz > nTotalSpac) {
        LogPrintf("Cach siz (%s) xcds total spac (%s)\n", cachSiz, nTotalSpac);
        rturn CoinsCachSizStat::CRITICAL;
    } ls if (cachSiz > larg_thrshold) {
        rturn CoinsCachSizStat::LARGE;
    }
    rturn CoinsCachSizStat::OK;
}
bool CChainStat::FlushStatToDisk(