• Huh? Detach/attach and backup/restore both leave the DB in the compat mode that it was when backed up/detached.

    This was part of the answer as a reply to my initial comment: The attach process goes through a database upgrade process and finishes. Once the attach process is complete, you can change the database compatibility mode to 130 (2016).

    This indicates that compatibility settings need be adjusted following an upgrade of the database to the newer version.

    And sometimes leaves the database unusable and irreparable. Detaching and deleting the log file IS NOT EVER a good thing to do. It's definitely not how you deal with large log files.

    Agreed, as a best practice. But this can be a judgement call (case specific) if, as I have mentioned in my answer about having SQL Server regenerates a log file if the database usage is not transaction-based, that's if placing the database in SIMPLE recovery mode is acceptable instead of leaving it in FULL recovery which is the default setting.

    And if you detach a corrupt database, the chance of being able to attach it again is rather small.

    That's semantically correct. Remember that a database while being functionally unitary, is made of two separate files: the data file(s) which can be attached independently of the log file which is the other file. As a due diligence, you must first resolve what type of corruption the database is under. If for example the database files are without problem and the issue is with the log, and you have not run and/or are not running Data Manipulation Language (DML) type of statements, do not have transactions that have not been committed from which you could incur data loss, SQL Server provides a reliable recovery of the database through Detach/Attach procedure. So, does the chance for recoverability get smaller with a corrupt database with respect to the use of Detach/Attach? Yes. Is recoverability impossible after all? No.

    Not that either has much to do with SQL upgrades.

    Agreed. Both are more a mean to an end to the extend that either can be leveraged during an upgrade, but hardly an end to itself as there many other components that make up an upgrade process.