from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('partner', '0042_auto_20171220_1305'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='partnerauditassessment',
            name='link_report',
        ),
        migrations.RemoveField(
            model_name='partnerauditassessment',
            name='most_recent_audit_report',
        ),
        migrations.RemoveField(
            model_name='partnerauditassessment',
            name='org_audits',
        ),
        migrations.AddField(
            model_name='partnerauditreport',
            name='created_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='audit_reports', to='account.User'),
        ),
    ]

from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('partner', '0042_auto_20171220_1305'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='partnerauditassessment',
            name='link_report',
        ),
        migrations.RemoveField(
            model_name='partnerauditassessment',
            name='most_recent_audit_report',
        ),
        migrations.RemoveField(
            model_name='partnerauditassessment',
            name='org_audits',
        ),
        migrations.AddField(
            model_name='partnerauditreport',
            name='created_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='audit_reports', to='account.User'),
        ),
    ]

Change migration so newly added field is nullable
Change migration so newly added field is nullable

  from __future__ import unicode_literals
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('partner', '0042_auto_20171220_1305'),
      ]
  
      operations = [
          migrations.RemoveField(
              model_name='partnerauditassessment',
              name='link_report',
          ),
          migrations.RemoveField(
              model_name='partnerauditassessment',
              name='most_recent_audit_report',
          ),
          migrations.RemoveField(
              model_name='partnerauditassessment',
              name='org_audits',
          ),
          migrations.AddField(
              model_name='partnerauditreport',
              name='created_by',
-             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='audit_reports', to='account.User'),
+             field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='audit_reports', to='account.User'),
          ),
      ]
  
Change migration so newly added field is nullable
## Code Before:
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('partner', '0042_auto_20171220_1305'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='partnerauditassessment',
            name='link_report',
        ),
        migrations.RemoveField(
            model_name='partnerauditassessment',
            name='most_recent_audit_report',
        ),
        migrations.RemoveField(
            model_name='partnerauditassessment',
            name='org_audits',
        ),
        migrations.AddField(
            model_name='partnerauditreport',
            name='created_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='audit_reports', to='account.User'),
        ),
    ]

## Instruction:
Change migration so newly added field is nullable
## Code After:
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('partner', '0042_auto_20171220_1305'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='partnerauditassessment',
            name='link_report',
        ),
        migrations.RemoveField(
            model_name='partnerauditassessment',
            name='most_recent_audit_report',
        ),
        migrations.RemoveField(
            model_name='partnerauditassessment',
            name='org_audits',
        ),
        migrations.AddField(
            model_name='partnerauditreport',
            name='created_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='audit_reports', to='account.User'),
        ),
    ]
