From 98029a6d467b6ba8498a9ce5c5891f0b31fa5cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 25 Oct 2019 16:45:01 +0200 Subject: [PATCH] Script to change the database structure from `DISABLED` to `DECIDED` relation - Apply default properties to the relation. --- ...isabled_relationship_to_decided_relationship.sh} | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) rename neo4j/{change_report_node_to_relationship.sh => change_disabled_relationship_to_decided_relationship.sh} (59%) diff --git a/neo4j/change_report_node_to_relationship.sh b/neo4j/change_disabled_relationship_to_decided_relationship.sh similarity index 59% rename from neo4j/change_report_node_to_relationship.sh rename to neo4j/change_disabled_relationship_to_decided_relationship.sh index f8dd639be..76703b373 100755 --- a/neo4j/change_report_node_to_relationship.sh +++ b/neo4j/change_disabled_relationship_to_decided_relationship.sh @@ -16,11 +16,10 @@ do done echo " -MATCH (submitter:User)-[:REPORTED]->(report:Report)-[:REPORTED]->(resource) -DETACH DELETE report -CREATE (submitter)-[reported:REPORTED]->(resource) -SET reported.createdAt = toString(datetime()) -SET reported.reasonCategory = 'other' -SET reported.reasonDescription = '!!! Created automatically to ensure database consistency! Creation date is when the database manipulation happened.' -RETURN reported; +MATCH (moderator:User)-[disabled:DISABLED]->(resource) +DELETE disabled +CREATE (moderator)-[decided:DECIDED]->(resource) +SET decided.createdAt = toString(datetime()) +SET decided.disabled = true +RETURN decided; " | cypher-shell