Expand the size of the foreign_document_data field
This commit is contained in:
@@ -2,6 +2,7 @@ from __future__ import absolute_import
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ugettext
|
||||
|
||||
from documents.models import DocumentType
|
||||
|
||||
@@ -31,9 +32,9 @@ class SmartLink(models.Model):
|
||||
class SmartLinkCondition(models.Model):
|
||||
smart_link = models.ForeignKey(SmartLink, verbose_name=_(u'Smart link'))
|
||||
inclusion = models.CharField(default=INCLUSION_AND, max_length=16, choices=INCLUSION_CHOICES, help_text=_(u'The inclusion is ignored for the first item.'))
|
||||
foreign_document_data = models.CharField(max_length=32, verbose_name=_(u'Foreign document attribute'), help_text=_(u'This represents the metadata of all other documents.'))
|
||||
foreign_document_data = models.CharField(max_length=128, verbose_name=_(u'Foreign document attribute'), help_text=_(u'This represents the metadata of all other documents.'))
|
||||
operator = models.CharField(max_length=16, choices=OPERATOR_CHOICES)
|
||||
expression = models.TextField(verbose_name=_(u'Expression'), help_text=_(u'This expression will be evaluated against the current selected document.'))
|
||||
expression = models.TextField(verbose_name=_(u'Expression'), help_text=ugettext(u'This expression will be evaluated against the current document.'))
|
||||
negated = models.BooleanField(default=False, verbose_name=_(u'Negated'), help_text=_(u'Inverts the logic of the operator.'))
|
||||
enabled = models.BooleanField(default=True, verbose_name=_(u'Enabled'))
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from south.utils import datetime_utils as 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 'SmartLinkCondition.foreign_document_data'
|
||||
db.alter_column(u'linking_smartlinkcondition', 'foreign_document_data', self.gf('django.db.models.fields.CharField')(max_length=128))
|
||||
|
||||
def backwards(self, orm):
|
||||
|
||||
# Changing field 'SmartLinkCondition.foreign_document_data'
|
||||
db.alter_column(u'linking_smartlinkcondition', 'foreign_document_data', self.gf('django.db.models.fields.CharField')(max_length=32))
|
||||
|
||||
models = {
|
||||
u'documents.documenttype': {
|
||||
'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'},
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}),
|
||||
'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
|
||||
},
|
||||
u'linking.smartlink': {
|
||||
'Meta': {'object_name': 'SmartLink'},
|
||||
'document_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.DocumentType']", 'symmetrical': 'False'}),
|
||||
'dynamic_title': ('django.db.models.fields.CharField', [], {'max_length': '96', 'blank': 'True'}),
|
||||
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'title': ('django.db.models.fields.CharField', [], {'max_length': '96'})
|
||||
},
|
||||
u'linking.smartlinkcondition': {
|
||||
'Meta': {'object_name': 'SmartLinkCondition'},
|
||||
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
'expression': ('django.db.models.fields.TextField', [], {}),
|
||||
'foreign_document_data': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'inclusion': ('django.db.models.fields.CharField', [], {'default': "u'&'", 'max_length': '16'}),
|
||||
'negated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
'operator': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
|
||||
'smart_link': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['linking.SmartLink']"})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['linking']
|
||||
Reference in New Issue
Block a user