Hmm, I kept thinking something felt wrong with this code and then I finally figured it out.
The code above to "fix the custom fields" drops the columns + indexes and then re-adds them, but the columns' data is not saved whatsoever? After the upgrade every custom field's data is lost. 🤨
The code should be changed to drop the index, run a CHANGE query on the column, and then re-add the fulltext index.
===
EDIT
Just noticed I failed to include the file's path in the first post:
The file is \applications\downloads\setup\upg_100013\upgrade.php