def METHOD_NAME(app, schema_editor):
    Job = app.get_model('main', 'Job')
    JobTemplate = app.get_model('main', 'JobTemplate')
    ct = 0
    for cls in (Job, JobTemplate):
        for j in cls.objects.iterator():
            if j.credential:
                ct += 1
                logger.debug('Migrating cred %s to %s %s multi-cred relation.', j.credential_id, cls, j.id)
                j.credentials.add(j.credential)
            if j.vault_credential:
                ct += 1
                logger.debug('Migrating cred %s to %s %s multi-cred relation.', j.vault_credential_id, cls, j.id)
                j.credentials.add(j.vault_credential)
            for cred in j.extra_credentials.all():
                ct += 1
                logger.debug('Migrating cred %s to %s %s multi-cred relation.', cred.id, cls, j.id)
                j.credentials.add(cred)
    if ct:
        logger.info('Finished migrating %s credentials to multi-cred', ct)