From 62a64beedcd74d79b7daa3be190c3bf9d56d7d87 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20K=C3=B6gl?= Date: Sat, 14 Jun 2014 13:26:32 +0200 Subject: [PATCH] [Models] Index outdated, extend guid to 200 chars --- .../podcasts/migrations/0006_auto_20140614_0836.py | 29 ++++++++++++++++++++++ .../podcasts/migrations/0007_auto_20140614_0846.py | 19 ++++++++++++++ mygpo/podcasts/models.py | 4 +-- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 mygpo/podcasts/migrations/0006_auto_20140614_0836.py create mode 100644 mygpo/podcasts/migrations/0007_auto_20140614_0846.py diff --git a/mygpo/podcasts/migrations/0006_auto_20140614_0836.py b/mygpo/podcasts/migrations/0006_auto_20140614_0836.py new file mode 100644 index 00000000..07656a51 --- /dev/null +++ b/mygpo/podcasts/migrations/0006_auto_20140614_0836.py @@ -0,0 +1,29 @@ +# encoding: utf8 +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('podcasts', '0005_auto_20140610_1854'), + ] + + operations = [ + migrations.AlterField( + model_name='episode', + name='outdated', + field=models.BooleanField(default=False, db_index=True), + ), + migrations.AlterField( + model_name='podcast', + name='outdated', + field=models.BooleanField(default=False, db_index=True), + ), + migrations.AlterField( + model_name='episode', + name='guid', + field=models.CharField(max_length=100, null=True), + ), + ] diff --git a/mygpo/podcasts/migrations/0007_auto_20140614_0846.py b/mygpo/podcasts/migrations/0007_auto_20140614_0846.py new file mode 100644 index 00000000..414dda3b --- /dev/null +++ b/mygpo/podcasts/migrations/0007_auto_20140614_0846.py @@ -0,0 +1,19 @@ +# encoding: utf8 +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('podcasts', '0006_auto_20140614_0836'), + ] + + operations = [ + migrations.AlterField( + model_name='episode', + name='guid', + field=models.CharField(max_length=200, null=True), + ), + ] diff --git a/mygpo/podcasts/models.py b/mygpo/podcasts/models.py index fa7f0acf..9caa7717 100644 --- a/mygpo/podcasts/models.py +++ b/mygpo/podcasts/models.py @@ -113,7 +113,7 @@ class MergedIdsModel(models.Model): class OutdatedModel(models.Model): - outdated = models.BooleanField(default=False) + outdated = models.BooleanField(default=False, db_index=True) class Meta: abstract = True @@ -253,7 +253,7 @@ class Episode(UUIDModel, TitleModel, DescriptionModel, LinkModel, AuthorModel, UrlsMixin, SlugsMixin, MergedUUIDsMixin): """ An episode """ - guid = models.CharField(max_length=50, null=True) + guid = models.CharField(max_length=200, null=True) content = models.TextField() released = models.DateTimeField(null=True) duration = models.PositiveIntegerField(null=True) -- 2.11.4.GIT