Reduce field and therefore index size to avoid MySQL regression errors

MySQL/ORACLE is being a jerk again and breaking backwards compatilibity (https://github.com/feincms/feincms/issues/261,
https://github.com/toastdriven/django-tastypie/pull/719)
This commit is contained in:
Roberto Rosario
2013-01-25 02:22:45 -04:00
parent 5b1e7cca3b
commit 07b82a4760
2 changed files with 3 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ class Migration(SchemaMigration):
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])),
('metadata_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['metadata.MetadataType'])),
('value', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=256, blank=True)),
('value', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=255, blank=True)),
))
db.send_create_signal('metadata', ['DocumentMetadata'])
@@ -209,4 +209,4 @@ class Migration(SchemaMigration):
}
}
complete_apps = ['metadata']
complete_apps = ['metadata']

View File

@@ -84,7 +84,7 @@ class DocumentMetadata(models.Model):
"""
document = models.ForeignKey(Document, verbose_name=_(u'document'))
metadata_type = models.ForeignKey(MetadataType, verbose_name=_(u'type'))
value = models.CharField(max_length=256, blank=True, verbose_name=_(u'value'), db_index=True)
value = models.CharField(max_length=255, blank=True, verbose_name=_(u'value'), db_index=True)
def __unicode__(self):
return unicode(self.metadata_type)