Commits

Derek Payton  committed 63aa474

Increase max_length in some Activity columns

  • Participants
  • Parent commits 06f4236

Comments (0)

Files changed (2)

File activitysync/migrations/0005_increase_column_lengths.py

+# encoding: 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):
+        
+        # Changing field 'Activity.username'
+        db.alter_column('activitysync_activity', 'username', self.gf('django.db.models.fields.CharField')(max_length=100))
+
+        # Changing field 'Activity.title'
+        db.alter_column('activitysync_activity', 'title', self.gf('django.db.models.fields.CharField')(max_length=500))
+
+        # Changing field 'Activity.author'
+        db.alter_column('activitysync_activity', 'author', self.gf('django.db.models.fields.CharField')(max_length=100))
+
+
+    def backwards(self, orm):
+        
+        # Changing field 'Activity.username'
+        db.alter_column('activitysync_activity', 'username', self.gf('django.db.models.fields.CharField')(max_length=20))
+
+        # Changing field 'Activity.title'
+        db.alter_column('activitysync_activity', 'title', self.gf('django.db.models.fields.CharField')(max_length=200))
+
+        # Changing field 'Activity.author'
+        db.alter_column('activitysync_activity', 'author', self.gf('django.db.models.fields.CharField')(max_length=20))
+
+
+    models = {
+        'activitysync.activity': {
+            'Meta': {'ordering': "('-pub_date',)", 'object_name': 'Activity'},
+            'author': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+            'comments': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+            'guid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'link': ('django.db.models.fields.URLField', [], {'max_length': '500'}),
+            'provider': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['activitysync.Provider']", 'null': 'True'}),
+            'pub_date': ('django.db.models.fields.DateTimeField', [], {}),
+            'published': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+            'username': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+        },
+        'activitysync.provider': {
+            'Meta': {'ordering': "('name',)", 'object_name': 'Provider'},
+            'link': ('django.db.models.fields.URLField', [], {'max_length': '500'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+            'prefix': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+            'sourceid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20', 'primary_key': 'True', 'db_index': 'True'})
+        }
+    }
+
+    complete_apps = ['activitysync']

File activitysync/models.py

         verbose_name = 'provider'
         verbose_name_plural = 'providers'
         ordering = ('name',)
-    
+
     def __unicode__(self):
         return u'%s' % self.name
 
 
 class Activity(models.Model):
     """Activity from social network (Twitter, Flickr, etc)."""
-    
-    title = models.CharField('title', max_length=200)
+
+    title = models.CharField('title', max_length=500)
     link = models.URLField(max_length=500)
-    username = models.CharField(max_length=20, blank=True)
-    author = models.CharField(max_length=20, blank=True)
+    username = models.CharField(max_length=100, blank=True)
+    author = models.CharField(max_length=100, blank=True)
     comments = models.TextField(blank=True)
     pub_date = models.DateTimeField('Date published')
     published = models.BooleanField(default=True)
     provider = models.ForeignKey(Provider, null=True)
 
     objects = ActivityManager()
-    
+
     class Meta:
         verbose_name = 'activity'
         verbose_name_plural = 'activities'
         ordering = ('-pub_date',)
         get_latest_by = 'pub_date'
-    
+
     def __unicode__(self):
         return u'%s' % self.title
-