Robert Schäfer 01a145be29 Container db-migration-worker need no volumes
You can simply run `docker-compose exec db-migration-worker migrate` and
that's it. Of course you have to provide all the environment variables.
2019-02-04 17:49:48 +01:00

13 lines
418 B
SQL

CALL apoc.load.json('file:/mongo-export/comments.json') YIELD value as comment
MERGE (c:Comment {id: comment._id["$oid"]})
ON CREATE SET
c.content = comment.content,
c.contentExcerpt = comment.contentExcerpt,
c.deleted = comment.deleted,
c.disabled = false
WITH comment
MATCH (p:Post {id: comment.contributionId}), (u:User {id: comment.userId})
MERGE (c)-[:COMMENTS]->(p)
MERGE (u)-[:WROTE]->(c)
;