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:
@@ -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']
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user