Currently, we can add new constraints to a blank database. We want to implement the checking logic to verify that there is not data that violates a constraint being added before adding the constraint.
For example - if the sample movie graph is created and the there are duplicates Movie nodes, then we want the following constraint to give an error indicating there is currently data that will violate the constraint.
CREATE CONSTRAINT movie_unique_title IF NOT EXISTS FOR (movie:Movie) REQUIRE movie.title IS UNIQUE
Currently, we can add new constraints to a blank database. We want to implement the checking logic to verify that there is not data that violates a constraint being added before adding the constraint.
For example - if the sample movie graph is created and the there are duplicates Movie nodes, then we want the following constraint to give an error indicating there is currently data that will violate the constraint.
CREATE CONSTRAINT movie_unique_title IF NOT EXISTS FOR (movie:Movie) REQUIRE movie.title IS UNIQUE