Fix migrations
This commit is contained in:
parent
59b0bc0ab8
commit
f595532db5
23
apps/map/migrations/0060_project_life_span_null.py
Normal file
23
apps/map/migrations/0060_project_life_span_null.py
Normal file
@ -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),
|
||||||
|
]
|
@ -8,7 +8,7 @@ from django.db import migrations, models
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('map', '0059_auto_20180519_1801'),
|
('map', '0060_project_life_span_null'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
Loading…
Reference in New Issue
Block a user