Add indices for the security worker fields on Image

Fixes #906
This commit is contained in:
Jake Moshenko 2015-11-18 13:29:51 -05:00
parent 206ffc65af
commit 18b14001b4
2 changed files with 28 additions and 2 deletions

View file

@ -576,8 +576,8 @@ class Image(BaseModel):
v1_json_metadata = TextField(null=True)
v1_checksum = CharField(null=True)
security_indexed = BooleanField(default=False)
security_indexed_engine = IntegerField(default=-1)
security_indexed = BooleanField(default=False, index=True)
security_indexed_engine = IntegerField(default=-1, index=True)
# We use a proxy here instead of 'self' in order to disable the foreign key constraint
parent = ForeignKeyField(_ImageProxy, index=True, null=True, related_name='children')