1. Guilherme Gondim
  2. django-agregador

Commits

Guilherme Gondim  committed 6616c2d

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

  • Participants
  • Parent commits fd90f21
  • Branches master

Comments (0)

Files changed (2)

File agregador/migrations/0004_auto__del_unique_entry_guid.py

View file
+# -*- 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 'Entry', fields ['guid']
+        db.delete_unique(u'agregador_entry', ['guid'])
+
+
+    def backwards(self, orm):
+        # Adding unique constraint on 'Entry', fields ['guid']
+        db.create_unique(u'agregador_entry', ['guid'])
+
+
+    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', [], {'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']

File agregador/models.py

View file
     guid = models.CharField(
         _('GUID'),
         max_length=500,
-        unique=True,
         db_index=True,
     )
     date_created = models.DateTimeField(_('Date created'), auto_now_add=True)