@@ -0,0 +1,971 @@
+# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.22 on 2019-08-05 17:09%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Adef migrate_current_issue_types(apps, schema_editor):%0A    Issue = apps.get_model(%22journal%22, %22Issue%22)%0A    IssueType = apps.get_model(%22journal%22, %22IssueType%22)%0A    for issue in Issue.objects.all():%0A        if issue.old_issue_type == %22Issue%22:%0A            issue_type = IssueType.objects.get(%0A                journal=issue.journal,%0A                code=%22issue%22,%0A            )%0A        else:%0A            issue_type = IssueType.objects.get(%0A                journal=issue.journal,%0A                code=%22collection%22,%0A            )%0A        issue.issue_type = issue_type%0A        issue.save()%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A    dependencies = %5B%0A        ('journal', '0033_migrate_issue_types'),%0A    %5D%0A%0A    operations = %5B%0A        migrations.RunPython(migrate_current_issue_types, reverse_code=migrations.RunPython.noop),%0A    %5D%0A

Migrate issue types on all issues