def METHOD_NAME(app, schema_editor):
    WorkflowJobTemplateNode = app.get_model('main', 'WorkflowJobTemplateNode')
    WorkflowJobNode = app.get_model('main', 'WorkflowJobNode')
    ct = 0
    for cls in (WorkflowJobNode, WorkflowJobTemplateNode):
        for node in cls.objects.iterator():
            if node.credential:
                logger.debug('Migrating prompted credential %s for %s %s', node.credential_id, cls, node.id)
                ct += 1
                node.credentials.add(node.credential)
    if ct:
        logger.info('Finished migrating total of %s workflow prompted credentials', ct)