mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
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.
13 lines
418 B
SQL
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)
|
|
;
|