@@ -0,0 +1,1032 @@
+# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.10 on 2018-03-28 07:50%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Adef tidy_progress_range(apps, schema_editor):%0A    %22%22%22%0A    Tidies progress ranges because a bug had caused them to go out of range%0A    %22%22%22%0A    ContentSessionLog = apps.get_model('logger', 'ContentSessionLog')%0A    ContentSummaryLog = apps.get_model('logger', 'ContentSummaryLog')%0A%0A    # Not knowing how floating points will behave in the local database,%0A    # 1.0 might become bigger than 1.0!!%0A    ContentSessionLog.objects.filter(progress__lt=0).update(progress=0.0)%0A    ContentSessionLog.objects.filter(progress__gt=1).update(progress=1.0)%0A    ContentSummaryLog.objects.filter(progress__lt=0).update(progress=0.0)%0A    ContentSummaryLog.objects.filter(progress__gt=1).update(progress=1.0)%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A    dependencies = %5B%0A        ('logger', '0003_auto_20170531_1140'),%0A    %5D%0A%0A    operations = %5B%0A        migrations.RunPython(tidy_progress_range),%0A    %5D%0A

Add migration for tidying up old values in progress fields