text: # -*- coding: utf-8 -*-
  # Generated by Django 1.11.17 on 2019-01-13 15:01
  from __future__ import unicode_literals
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('invoices', '0010_payment_refector'),
          ('paypal', '0001_initial'),
      ]
  
      operations = [
          migrations.RunSQL("SET CONSTRAINTS ALL IMMEDIATE"),
          migrations.RemoveField(
              model_name='transactioninfo',
              name='sourceaccount',
          ),
          migrations.AddField(
              model_name='transactioninfo',
              name='paymentmethod',
              field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='invoices.InvoicePaymentMethod'),
          ),
          migrations.AddField(
              model_name='errorlog',
              name='paymentmethod',
              field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='invoices.InvoicePaymentMethod'),
          ),
          migrations.DeleteModel(
              name='SourceAccount',
          ),
          migrations.RunSQL(
              "UPDATE paypal_transactioninfo SET paymentmethod_id = (SELECT id FROM invoices_invoicepaymentmethod WHERE classname='postgresqleu.util.payment.paypal.Paypal') WHERE paymentmethod_id IS NULL",
          ),
          migrations.AlterField(
              model_name='transactioninfo',
              name='paymentmethod',
              field=models.ForeignKey(blank=False, null=False, on_delete=django.db.models.deletion.CASCADE, to='invoices.InvoicePaymentMethod'),
          ),
      ]
  