Manipulate database to replace report node with direct REPORTED relation

This commit is contained in:
Wolfgang Huß 2019-10-11 17:33:04 +02:00
parent 1c8385120c
commit d5e1a67e0c

View File

@ -0,0 +1,7 @@
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! Date-time is this creation date and time.'
RETURN reported