Skip to content

Commit

Permalink
DFIQ 1.1 changes (#1122)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchop authored Aug 22, 2024
1 parent 3fff0d5 commit b1f8787
Show file tree
Hide file tree
Showing 17 changed files with 542 additions and 537 deletions.
11 changes: 10 additions & 1 deletion core/database_arango.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ def connect(
],
},
)

for collection_data in self.db.collections():
if collection_data["system"]:
continue
collection = self.db.collection(collection_data["name"])
for index in collection.indexes():
if index["type"] == "persistent":
collection.delete_index(index["id"])

self.db.collection("observables").add_persistent_index(
fields=["value", "type"], unique=True
)
Expand All @@ -116,7 +125,7 @@ def connect(
fields=["name", "type"], unique=True
)
self.db.collection("dfiq").add_persistent_index(
fields=["dfiq_id", "type"], unique=True
fields=["uuid"], unique=True, sparse=True
)

def clear(self, truncate=True):
Expand Down
Loading

0 comments on commit b1f8787

Please sign in to comment.