Plone 5 Custom Archetype to Dexterity using @@custom_migration does not migrate

I have fixed the problem. I rolled back the site to last night's backup (before doing anything in portal_setup). Instead I traced the custom_migration.py file in plone.app.contenttypes and added some logging to discover that it was failing not on my custom type but on the old Archetype-based Folder type. All folders had been replaced by Dexterity already, so that was odd. I added a try/except for getting old types to present since I really only wanted it for my custom type anyway.

Line 176 custom_migration.py:

   ` logger.info( 'getting fields for type "%s"' % typename )
    try:
        for field_name in obj.schema._fields:
            field = obj.schema._fields[field_name]
            if not field.getName() in self.at_metadata_fields:
                translated_label = translate(field.widget.label)
                results.append(
                    {'id': field.getName(),
                     'title': '%s (%s)' % (translated_label, field.getType()),
                     'type': field.getType()})
    except:
        logger.info( 'Skipped type "%s"' % typename )`

Then everything worked perfectly.