Import collections in order

This commit is contained in:
Robert Schäfer 2019-01-20 23:18:42 +01:00
parent d0fa8b7e21
commit 3aef664c8c

View File

@ -1,4 +1,7 @@
#!/usr/bin/env bash
SCRIPT_DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r;" | cypher-shell
cat $SCRIPT_DIRECTORY/*.cql | cypher-shell
for collection in "users" "contributions" "comments"
do
echo "Import ${collection}..." && cat $SCRIPT_DIRECTORY/$collection.cql | cypher-shell
done