Update tests/mgbench/dataset_creator.py

Co-authored-by: Jure Bajic <jure.bajic@memgraph.com>
This commit is contained in:
Jeremy B 2022-11-02 14:14:16 +01:00 committed by GitHub
parent edeebf46ec
commit 1d18f1197f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,18 +67,18 @@ def main():
assert percentage_of_permissions > 0.0 and percentage_of_permissions <= 1.0
assert filename != ""
f = open(filename, "w")
with open(filename, "w") as f:
f.write("MATCH (n) DETACH DELETE n;\n")
f.write("MATCH (n) DETACH DELETE n;\n")
# Create the indexes
f.write("CREATE INDEX ON :File;\n")
f.write("CREATE INDEX ON :Permission;\n")
f.write("CREATE INDEX ON :Identity;\n")
f.write("CREATE INDEX ON :File(platformId);\n")
f.write("CREATE INDEX ON :File(name);\n")
f.write("CREATE INDEX ON :Permission(name);\n")
f.write("CREATE INDEX ON :Identity(email);\n")
# Create the indexes
f.write("CREATE INDEX ON :File;\n")
f.write("CREATE INDEX ON :Permission;\n")
f.write("CREATE INDEX ON :Identity;\n")
f.write("CREATE INDEX ON :File(platformId);\n")
f.write("CREATE INDEX ON :File(name);\n")
f.write("CREATE INDEX ON :Permission(name);\n")
f.write("CREATE INDEX ON :Identity(email);\n")
# Create extra index: in distributed, this will be the schema
f.write("CREATE INDEX ON :File(uuid);\n")