Commits

Guilherme Gondim committed fd90f21

Remove UNIQUE attr from feed_url field due a problem with non-MyISAM engines on MySQL.

  • Participants
  • Parent commits 5ce0b26
  • Tags 0.2

Comments (0)

Files changed (3)

agregador/__init__.py

-VERSION = (0, 1)
+VERSION = (0, 2)
 
 
 def get_version():

agregador/migrations/0003_auto__del_unique_feed_feed_url.py

+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+    def forwards(self, orm):
+        # Removing unique constraint on 'Feed', fields ['feed_url']
+        db.delete_unique(u'agregador_feed', ['feed_url'])
+
+
+    def backwards(self, orm):
+        # Adding unique constraint on 'Feed', fields ['feed_url']
+        db.create_unique(u'agregador_feed', ['feed_url'])
+
+
+    models = {
+        u'agregador.entry': {
+            'Meta': {'ordering': "('-date',)", 'object_name': 'Entry'},
+            'date': ('django.db.models.fields.DateTimeField', [], {}),
+            'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+            'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+            'feed': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'entries'", 'to': u"orm['agregador.Feed']"}),
+            'guid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '500', 'db_index': 'True'}),
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'link': ('django.db.models.fields.URLField', [], {'max_length': '500'}),
+            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+        },
+        u'agregador.feed': {
+            'Meta': {'ordering': "('title',)", 'object_name': 'Feed'},
+            'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+            'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+            'feed_url': ('django.db.models.fields.URLField', [], {'max_length': '500'}),
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'is_defunct': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'public_url': ('django.db.models.fields.URLField', [], {'max_length': '500'}),
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+        }
+    }
+
+    complete_apps = ['agregador']

agregador/models.py

 
 class Feed(models.Model):
     title = models.CharField(_('Title'), max_length=500)
-    feed_url = models.URLField(_('Feed URL'), unique=True, max_length=500)
+    feed_url = models.URLField(_('Feed URL'), max_length=500)
     public_url = models.URLField(_('Public URL'), max_length=500)
     is_defunct = models.BooleanField(_('Is defunct?'))
     date_created = models.DateTimeField(_('Date created'), auto_now_add=True)