old_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.10.8 on 2019-01-30 11:45
  from __future__ import unicode_literals
  
  from bluebottle.clients import properties
  from django.db import migrations, connection
  
  from bluebottle.payments_stripe.adapters import StripePaymentAdapter as BaseAdapter
  
  
  def update_stripe_payments(apps, schema_editor):
  
      StripePayment = apps.get_model('payments_stripe', 'StripePayment')
      Client = apps.get_model('clients', 'Client')
  
      tenant = Client.objects.get(schema_name=connection.tenant.schema_name)
      properties.set_tenant(tenant)
  
      class StripePaymentAdapter(BaseAdapter):
          models = [StripePayment]
  
          def __init__(self, payment):
              self.payment = payment
              self.order_payment = payment.order_payment
  
      for payment in StripePayment.objects.all():
          adapter = StripePaymentAdapter(payment)
          adapter.check_payment_status()
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('payments_stripe', '0003_auto_20190130_1231'),
      ]
  
      operations = [
          migrations.RunPython(
              update_stripe_payments,
              migrations.RunPython.noop
          )
      ]
  
new_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.10.8 on 2019-01-30 11:45
  from __future__ import unicode_literals
  
  from bluebottle.clients import properties
  from django.db import migrations, connection
  
  from bluebottle.payments_stripe.adapters import StripePaymentAdapter as BaseAdapter
  
  
  def update_stripe_payments(apps, schema_editor):
  
      StripePayment = apps.get_model('payments_stripe', 'StripePayment')
      Client = apps.get_model('clients', 'Client')
  
      tenant = Client.objects.get(schema_name=connection.tenant.schema_name)
      properties.set_tenant(tenant)
  
      class StripePaymentAdapter(BaseAdapter):
          models = [StripePayment]
  
          def __init__(self, payment):
              self.payment = payment
              self.order_payment = payment.order_payment
  
      for payment in StripePayment.objects.all():
          adapter = StripePaymentAdapter(payment)
          adapter.check_payment_status()
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('payments_stripe', '0003_auto_20190130_1231'),
          ('donations', '0010_auto_20190130_1141')
      ]
  
      operations = [
          migrations.RunPython(
              update_stripe_payments,
              migrations.RunPython.noop
          )
      ]
  
subject: Add migration dependancy