From f595532db52e1d94251be811d843f23236894474 Mon Sep 17 00:00:00 2001 From: Carl van Tonder Date: Thu, 24 May 2018 18:24:55 -0400 Subject: [PATCH] Fix migrations --- .../migrations/0060_project_life_span_null.py | 23 +++++++++++++++++++ ...523_1659.py => 0061_auto_20180523_1659.py} | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 apps/map/migrations/0060_project_life_span_null.py rename apps/map/migrations/{0060_auto_20180523_1659.py => 0061_auto_20180523_1659.py} (91%) diff --git a/apps/map/migrations/0060_project_life_span_null.py b/apps/map/migrations/0060_project_life_span_null.py new file mode 100644 index 0000000..88956c2 --- /dev/null +++ b/apps/map/migrations/0060_project_life_span_null.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2018-05-24 22:19 +from __future__ import unicode_literals + +from django.db import migrations + + +def null_life_span(apps, schema_editor): + CaseStudy = apps.get_model('map', 'CaseStudy') + CaseStudy.objects.filter(project_life_span=None).update( + project_life_span='' + ) + + +class Migration(migrations.Migration): + + dependencies = [ + ('map', '0059_auto_20180519_1801'), + ] + + operations = [ + migrations.RunPython(null_life_span), + ] diff --git a/apps/map/migrations/0060_auto_20180523_1659.py b/apps/map/migrations/0061_auto_20180523_1659.py similarity index 91% rename from apps/map/migrations/0060_auto_20180523_1659.py rename to apps/map/migrations/0061_auto_20180523_1659.py index 5066bb3..5fc77e1 100644 --- a/apps/map/migrations/0060_auto_20180523_1659.py +++ b/apps/map/migrations/0061_auto_20180523_1659.py @@ -8,7 +8,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('map', '0059_auto_20180519_1801'), + ('map', '0060_project_life_span_null'), ] operations = [