summaryrefslogtreecommitdiff
path: root/res/neo4j/reset-db__clean.cypher
diff options
context:
space:
mode:
Diffstat (limited to 'res/neo4j/reset-db__clean.cypher')
-rw-r--r--res/neo4j/reset-db__clean.cypher15
1 files changed, 15 insertions, 0 deletions
diff --git a/res/neo4j/reset-db__clean.cypher b/res/neo4j/reset-db__clean.cypher
new file mode 100644
index 00000000..29f1afd7
--- /dev/null
+++ b/res/neo4j/reset-db__clean.cypher
@@ -0,0 +1,15 @@
+// Flush
+match (n) optional match (n)-[r]-() delete r,n;
+
+//
+// Constraints
+//
+// FIXME: use wildcard constraint when supported
+//
+create constraint on (x:Person) assert x.id is unique;
+create constraint on (x:Skill) assert x.id is unique;
+create constraint on (x:Person) assert x.name is unique;
+create constraint on (x:Skill) assert x.name is unique;
+
+// init commit block chain
+create (n:__HEAD:__Commit {hash: 'da39a3ee5e6b4b0d3255bfef95601890afd80709', blob: '', id: 'da39a3ee5e6b4b0d3255bfef95601890afd80709', name: 'root-commit', ts_created: 0 });