diff --git a/aggrec/db_models.py b/aggrec/db_models.py index 32479c5..794aa8f 100644 --- a/aggrec/db_models.py +++ b/aggrec/db_models.py @@ -9,10 +9,7 @@ class AggregateType(Enum): class AggregateMetadata(Document): - meta = { - "collection": "aggregates", - "indexes": [{"fields": ["content_digest"], "unique": True, "sparse": True}], - } + meta = {"collection": "aggregates"} creator = StringField() @@ -22,7 +19,7 @@ class AggregateMetadata(Document): content_type = StringField() content_length = IntField() - content_digest = StringField() + content_digest = StringField(unique=True, sparse=True) s3_bucket = StringField() s3_object_key = StringField()