@@ -0,0 +1,1160 @@
+%22%22%22%0ARemoves signatures, so they can be easily recreated during deployment.%0A%0AThis migration is intended to be used between %22eras%22 of signatures. As%0Athe serialization format of recipes changes, the signatures need to%0Aalso change. This could be handled automatically, but it is easier to%0Adeploy if we just remove everything in a migration, and allow the%0Anormal processes to regenerate the signatures.%0A%22%22%22%0A%0A# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Adef remove_signatures(apps, schema_editor):%0A    Recipe = apps.get_model('recipes', 'Recipe')%0A    Signature = apps.get_model('recipes', 'Signature')%0A%0A    for recipe in Recipe.objects.exclude(signature=None):%0A        sig = recipe.signature%0A        recipe.signature = None%0A        recipe.save()%0A        sig.delete()%0A%0A    for sig in Signature.objects.all():%0A        sig.delete()%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A    dependencies = %5B%0A        ('recipes', '0041_remove_invalid_signatures'),%0A    %5D%0A%0A    operations = %5B%0A        # This function as both a forward and reverse migration%0A        migrations.RunPython(remove_signatures, remove_signatures),%0A    %5D%0A

Add migration to reset signatures