summaryrefslogtreecommitdiff
path: root/res/neo4j/reset-db__clean.cypher
blob: 29f1afd7b883f022e6ee03d58e8f0db0372f0233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 });