# Generated by Django 2.0.13 on 2020-04-23 12:55

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


def delete_force(apps, schema_editor):
    # We can't import Infrastructure models directly as it may be a newer
    # version than this migration expects. We use the historical version.
    Blade = apps.get_model('signage', 'Blade')
    Blade.objects.filter(deleted=True).delete()


class Migration(migrations.Migration):

    dependencies = [
        ('signage', '0012_auto_20200406_1411'),
    ]

    operations = [
        migrations.AlterField(
            model_name='line',
            name='blade',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lines',
                                    to='signage.Blade', verbose_name='Blade'),
        ),
        migrations.RunPython(delete_force),
        migrations.RemoveField(
            model_name='blade',
            name='deleted',
        ),
        migrations.RemoveField(
            model_name='blade',
            name='structure',
        ),
        migrations.RemoveField(
            model_name='line',
            name='structure',
        ),
    ]

@@ -353,16 +353,115 @@
 Blade')%0A
+    Line = apps.get_model('signage', 'Line')%0A    Line.objects.filter(blade__deleted=True).delete()%0A
     Blad
@@ -633,24 +633,178 @@
 rations = %5B%0A
+        migrations.SeparateDatabaseAndState(%0A            database_operations=%5Bmigrations.RunPython(delete_force)%5D,%0A            state_operations=%5B%0A        
         migr
@@ -818,24 +818,32 @@
 AlterField(%0A
+        
             
@@ -869,24 +869,32 @@
             
+   
+     
 name='blade'
@@ -887,32 +887,40 @@
   name='blade',%0A
+        
             fiel
@@ -1042,16 +1042,24 @@
         
+        
 to='sign
@@ -1089,24 +1089,32 @@
 e='Blade'),%0A
+        
         ),%0A 
@@ -1124,44 +1124,8 @@
     
-migrations.RunPython(delete_force),%0A
     
@@ -1144,32 +1144,40 @@
 ns.RemoveField(%0A
+        
             mode
@@ -1208,21 +1208,31 @@
     
-name='deleted
+        name='structure
 ',%0A 
@@ -1230,32 +1230,40 @@
 cture',%0A        
+  
+      
 ),%0A        migra
@@ -1249,32 +1249,40 @@
      ),%0A        
+ 
+       
 migrations.Remov
@@ -1293,32 +1293,40 @@
 ld(%0A            
+       
+ 
 model_name='blad
@@ -1317,32 +1317,39 @@
 model_name='
-blade',%0A
+line',%0A        
             
@@ -1374,27 +1374,42 @@
         
+ 
-),%0A
+       ),%0A       
         
 migratio
@@ -1392,32 +1392,33 @@
 %0A               
+ 
 migrations.Remov
@@ -1429,32 +1429,40 @@
 ld(%0A            
+        
 model_name='line
@@ -1449,35 +1449,36 @@
     model_name='
-lin
+blad
 e',%0A            
@@ -1481,34 +1481,64 @@
     
+ 
-name='structure',%0A        
+       name='deleted',%0A                ),%0A            %5D
 ),%0A 

Fix migration