Renamed typo on schema

This commit is contained in:
Griatch 2014-02-16 16:55:39 +01:00
parent a9f10d7801
commit bdacc7beba
3 changed files with 9 additions and 8 deletions

View file

@ -13,8 +13,8 @@ class Migration(SchemaMigration):
self.gf('django.db.models.fields.CharField')(db_index=True, max_length=32, null=True, blank=True),
keep_default=False)
# Adding field 'Attribute.db_attrype'
db.add_column(u'typeclasses_attribute', 'db_attrype',
# Adding field 'Attribute.db_attrtype'
db.add_column(u'typeclasses_attribute', 'db_attrtype',
self.gf('django.db.models.fields.CharField')(db_index=True, max_length=16, null=True, blank=True),
keep_default=False)
@ -33,8 +33,8 @@ class Migration(SchemaMigration):
# Deleting field 'Attribute.db_model'
db.delete_column(u'typeclasses_attribute', 'db_model')
# Deleting field 'Attribute.db_attrype'
db.delete_column(u'typeclasses_attribute', 'db_attrype')
# Deleting field 'Attribute.db_attrtype'
db.delete_column(u'typeclasses_attribute', 'db_attrtype')
# Deleting field 'Tag.db_model'
db.delete_column(u'typeclasses_tag', 'db_model')
@ -46,7 +46,7 @@ class Migration(SchemaMigration):
models = {
u'typeclasses.attribute': {
'Meta': {'object_name': 'Attribute'},
'db_attrype': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'null': 'True', 'blank': 'True'}),
'db_attrtype': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'null': 'True', 'blank': 'True'}),
'db_category': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}),
'db_date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'db_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
@ -67,4 +67,4 @@ class Migration(SchemaMigration):
}
}
complete_apps = ['typeclasses']
complete_apps = ['typeclasses']

View file

@ -237,7 +237,7 @@ class Migration(DataMigration):
},
u'typeclasses.attribute': {
'Meta': {'object_name': 'Attribute'},
'db_attrype': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'null': 'True', 'blank': 'True'}),
'db_attrtype': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'null': 'True', 'blank': 'True'}),
'db_category': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}),
'db_date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'db_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),

View file

@ -109,7 +109,7 @@ class Attribute(SharedMemoryModel):
# Which model of object this Attribute is attached to (A natural key like objects.dbobject)
db_model = models.CharField('model', max_length=32, db_index=True, blank=True, null=True)
# subclass of Attribute (None or nick)
db_attrype = models.CharField('attrtype', max_length=16, db_index=True, blank=True, null=True)
db_attrtype = models.CharField('attrtype', max_length=16, db_index=True, blank=True, null=True)
# time stamp
db_date_created = models.DateTimeField('date_created', editable=False, auto_now_add=True)
@ -588,6 +588,7 @@ class TagHandler(object):
return [(to_str(p.db_key), to_str(p.db_category)) for p in matches]
else:
return [to_str(p.db_key) for p in matches]
return []
#return [to_str(p[0]) for p in _GA(self.obj, self._m2m_fieldname).filter(db_category__startswith=self.prefix).values_list("db_key") if p[0]]