mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
fixed deleted flag import
This commit is contained in:
parent
9cbb736d70
commit
c14a4f3134
@ -109,8 +109,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
[?] deleted: {
|
||||
[X] type: Boolean,
|
||||
[?] deleted: { // THis field is not always present in the alpha-data
|
||||
[?] type: Boolean,
|
||||
[ ] default: false, // Default value is missing in Nitro
|
||||
[-] index: true
|
||||
},
|
||||
@ -137,7 +137,7 @@ p.contentExcerpt = post.contentExcerpt,
|
||||
p.visibility = toLower(post.visibility),
|
||||
p.createdAt = post.createdAt.`$date`,
|
||||
p.updatedAt = post.updatedAt.`$date`,
|
||||
p.deleted = post.deleted,
|
||||
p.deleted = COALESCE(post.deleted,false),
|
||||
p.disabled = NOT post.isEnabled
|
||||
WITH p, post
|
||||
MATCH (u:User {id: post.userId})
|
||||
|
||||
@ -9,10 +9,10 @@ set +o allexport
|
||||
# Delete collection function defintion
|
||||
function delete_collection () {
|
||||
# Delete from Database
|
||||
echo "Delete $1"
|
||||
echo "Delete $2"
|
||||
"${IMPORT_CYPHERSHELL_BIN}" < $(dirname "$0")/$1/delete.cql > /dev/null
|
||||
# Delete index file
|
||||
rm -f "${IMPORT_PATH}splits/$1.index"
|
||||
rm -f "${IMPORT_PATH}splits/$2.index"
|
||||
}
|
||||
|
||||
# Import collection function defintion
|
||||
@ -52,13 +52,14 @@ SECONDS=0
|
||||
|
||||
# Delete all Neo4J Database content
|
||||
echo "Deleting Database Contents"
|
||||
delete_collection "badges"
|
||||
delete_collection "categories"
|
||||
delete_collection "users"
|
||||
delete_collection "follows"
|
||||
delete_collection "contributions"
|
||||
delete_collection "shouts"
|
||||
delete_collection "comments"
|
||||
delete_collection "badges" "badges"
|
||||
delete_collection "categories" "categories"
|
||||
delete_collection "users" "users"
|
||||
delete_collection "follows" "follows_users"
|
||||
delete_collection "contributions" "contributions_post"
|
||||
delete_collection "contributions" "contributions_cando"
|
||||
delete_collection "shouts" "shouts"
|
||||
delete_collection "comments" "comments"
|
||||
|
||||
#delete_collection "emotions"
|
||||
#delete_collection "invites"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user