2 from __future__
import unicode_literals
4 from django
.db
import models
, migrations
7 def set_scope(apps
, schema_editor
):
8 URL
= apps
.get_model('podcasts', 'URL')
9 Slug
= apps
.get_model('podcasts', 'Slug')
11 URL
.objects
.filter(scope__isnull
=True).update(scope
='')
12 Slug
.objects
.filter(scope__isnull
=True).update(scope
='')
15 class Migration(migrations
.Migration
):
18 ('podcasts', '0014_auto_20140615_1032'),
22 migrations
.AlterField(
25 field
=models
.CharField(db_index
=True, max_length
=32, blank
=True, null
=True),
27 migrations
.AlterField(
30 field
=models
.CharField(db_index
=True, max_length
=32, blank
=True, null
=True),
32 migrations
.RunPython(set_scope
),
33 migrations
.AlterField(
36 field
=models
.CharField(db_index
=True, max_length
=32, blank
=True, null
=False),
38 migrations
.AlterField(
41 field
=models
.CharField(db_index
=True, max_length
=32, blank
=True, null
=False),