docs: def update_payTo(apps, schema_editor):
      '''
      With the new TransactionParty model, the senders and recipients of financial
      transactions are held in one place.  So, we need to loop through old ExpenseItems,
      RevenueItems, and GenericRepeatedExpense and move their old party references
      to the new party model. 
      '''
      TransactionParty = apps.get_model('financial', 'TransactionParty')
      ExpenseItem = apps.get_model('financial', 'ExpenseItem')
      RevenueItem = apps.get_model('financial', 'RevenueItem')
      GenericRepeatedExpense = apps.get_model('financial', 'GenericRepeatedExpense')
  
      # First, update expense items and Generic repeated expense rules
      for item in chain(
          ExpenseItem.objects.filter(
              Q(payToUser__isnull=False) | Q(payToLocation__isnull=False) | Q(payToName__isnull=False)
          ),
          GenericRepeatedExpense.objects.filter(
              Q(payToUser__isnull=False) | Q(payToLocation__isnull=False) | Q(payToName__isnull=False)
          ),
      ):
          if getattr(item, 'payToUser', None):
              party = TransactionParty.objects.get_or_create(
                  user=item.payToUser,
                  defaults={
                      'name': getFullName(item.payToUser),
                      'staffMember': getattr(item.payToUser, 'staffmember', None),
                  }
              )[0]
          elif getattr(item, 'payToLocation', None):
              party = TransactionParty.objects.get_or_create(
                  location=item.payToLocation,
                  defaults={
                      'name': item.payToLocation.name,
                  }
              )[0]
          elif getattr(item, 'payToName', None):
              party = createPartyFromName(apps, item.payToName)
  
          item.payTo = party
          item.save()
  
      # Finally, update revenue items
      for item in RevenueItem.objects.filter(
          Q(receivedFromName__isnull=False)
      ):
          party = createPartyFromName(apps, item.receivedFromName)
          item.receivedFrom = party
          item.save()