@@ -0,0 +1,600 @@
+from django.core.management.base import BaseCommand, CommandError%0Aimport reversion%0A%0Afrom onadata.apps.logger.models import Instance%0A%0A%0Aclass Command(BaseCommand):%0A    help = 'Create version of submissions'%0A%0A    def handle(self, *args, **options):%0A        id_string = %22aq6BX3GMavXWWv5NdCcapK%22%0A        submissions = Instance.objects.filter(xform__id_string=id_string)%0A        print(len(submissions))%0A        for s in submissions:%0A            with reversion.create_revision():%0A                s.save()%0A                reversion.set_user(s.user)%0A                reversion.set_comment(%22Created revision 2%22)

create reversions