fixed deleted flag import

This commit is contained in:
Ulf Gebhardt 2019-06-24 12:06:09 +02:00
parent 9cbb736d70
commit c14a4f3134
No known key found for this signature in database
GPG Key ID: 44C888923CC8E7F3
2 changed files with 13 additions and 12 deletions

View File

@ -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})

View File

@ -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"