diff --git a/deployment/legacy-migration/maintenance-worker/migration/neo4j/dbManipulations/20191011_changeReportNodeToRelationOnly.cql b/deployment/legacy-migration/maintenance-worker/migration/neo4j/dbManipulations/20191011_changeReportNodeToRelationOnly.cql new file mode 100644 index 000000000..8c32cf5ec --- /dev/null +++ b/deployment/legacy-migration/maintenance-worker/migration/neo4j/dbManipulations/20191011_changeReportNodeToRelationOnly.cql @@ -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 \ No newline at end of file