def forwards_move_repo_source(apps, schema_editor):
 RemoteRepository = apps.get_model(u'oauth', u'RemoteRepository')
 SocialAccount = apps.get_model(u'socialaccount', u'SocialAccount')
 for account in SocialAccount.objects.all():
  rows = RemoteRepository.objects.filter(users=account.user, source=account.provider).update(account=account)

def forwards_move_repo_source ( apps , schema_editor ) : RemoteRepository = apps . get_model ( u'oauth' , u'RemoteRepository' ) SocialAccount = apps . get_model ( u'socialaccount' , u'SocialAccount' ) for account in SocialAccount . objects . all ( ) : rows = RemoteRepository . objects . filter ( users = account . user , source = account . provider ) . update ( account = account )
use source field to set repository account .