mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
added existing data imports
This commit is contained in:
parent
014104e055
commit
4ccfe3822c
@ -1,4 +1,4 @@
|
||||
CALL apoc.load.json('file:/tmp/mongo-export/splits/current-chunk.json') YIELD value as category
|
||||
CALL apoc.load.json("file:${IMPORT_CHUNK_PATH_CQL}") YIELD value as category
|
||||
MERGE(c:Category {id: category._id["$oid"]})
|
||||
ON CREATE SET
|
||||
c.name = category.title,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CALL apoc.load.json('file:/tmp/mongo-export/splits/current-chunk.json') YIELD value as json
|
||||
CALL apoc.load.json("file:${IMPORT_CHUNK_PATH_CQL}") YIELD value as json
|
||||
|
||||
MERGE (comment:Comment {id: json._id["$oid"]})
|
||||
ON CREATE SET
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CALL apoc.load.json('file:/tmp/mongo-export/splits/current-chunk.json') YIELD value as post
|
||||
CALL apoc.load.json("file:${IMPORT_CHUNK_PATH_CQL}") YIELD value as post
|
||||
MERGE (p:Post {id: post._id["$oid"]})
|
||||
ON CREATE SET
|
||||
p.title = post.title,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CALL apoc.load.json('file:/tmp/mongo-export/splits/current-chunk.json') YIELD value as follow
|
||||
CALL apoc.load.json("file:${IMPORT_CHUNK_PATH_CQL}") YIELD value as follow
|
||||
MATCH (u1:User {id: follow.userId}), (u2:User {id: follow.foreignId})
|
||||
MERGE (u1)-[:FOLLOWS]->(u2)
|
||||
;
|
||||
|
||||
@ -27,21 +27,21 @@ echo "MATCH (n) DETACH DELETE n;" | "${IMPORT_CYPHERSHELL_BIN}" -u ${NEO4J_USERN
|
||||
# Import Data
|
||||
echo "Start Importing Data"
|
||||
import_collection "badges"
|
||||
#import_collection "categories"
|
||||
#import_collection "comments"
|
||||
#import_collection "contributions"
|
||||
import_collection "categories"
|
||||
import_collection "users"
|
||||
import_collection "follows"
|
||||
import_collection "contributions"
|
||||
import_collection "shouts"
|
||||
import_collection "comments"
|
||||
#import_collection "emotions"
|
||||
#import_collection "follows"
|
||||
#import_collection "invites"
|
||||
#import_collection "notifications"
|
||||
#import_collection "organizations"
|
||||
#import_collection "pages"
|
||||
#import_collection "projects"
|
||||
#import_collection "settings"
|
||||
#import_collection "shouts"
|
||||
#import_collection "status"
|
||||
#import_collection "systemnotifications"
|
||||
#import_collection "users"
|
||||
#import_collection "userscandos"
|
||||
#import_collection "usersettings"
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CALL apoc.load.json('file:/tmp/mongo-export/splits/current-chunk.json') YIELD value as shout
|
||||
CALL apoc.load.json("file:${IMPORT_CHUNK_PATH_CQL}") YIELD value as shout
|
||||
MATCH (u:User {id: shout.userId}), (p:Post {id: shout.foreignId})
|
||||
MERGE (u)-[:SHOUTED]->(p)
|
||||
;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CALL apoc.load.json('file:/tmp/mongo-export/splits/current-chunk.json') YIELD value as user
|
||||
CALL apoc.load.json("file:${IMPORT_CHUNK_PATH_CQL}") YIELD value as user
|
||||
MERGE(u:User {id: user._id["$oid"]})
|
||||
ON CREATE SET
|
||||
u.name = user.name,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user