Merge pull request #25 from gpodder/categories
[mygpo.git] / mygpo / podcasts / migrations / 0015_auto_20140616_2126.py
blobc250c4b65a40151cfb0e3e20655cbbc4c7349b82
1 # encoding: utf8
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):
17 dependencies = [
18 ('podcasts', '0014_auto_20140615_1032'),
21 operations = [
22 migrations.AlterField(
23 model_name='slug',
24 name='scope',
25 field=models.CharField(db_index=True, max_length=32, blank=True, null=True),
27 migrations.AlterField(
28 model_name='url',
29 name='scope',
30 field=models.CharField(db_index=True, max_length=32, blank=True, null=True),
32 migrations.RunPython(set_scope),
33 migrations.AlterField(
34 model_name='slug',
35 name='scope',
36 field=models.CharField(db_index=True, max_length=32, blank=True, null=False),
38 migrations.AlterField(
39 model_name='url',
40 name='scope',
41 field=models.CharField(db_index=True, max_length=32, blank=True, null=False),