Change to data model requires changes
Suppose our use cases for our application have changed. We no longer want these restrictions in our graph:
-
Released date and title for a movie are unique
-
Timestamp for the RATED relationship is no longer required
Identify the names of these constraints in the graph and drop them.
Validate Results
Once you have dropped the two constraints, click the Check Constraints button and we will check the database for you.
Hint
Use SHOW CONSTRAINTS
to list the names of the constraints.
Use DROP CONSTRAINT <name>
to drop each constraint
Solution
Here is the code to drop these constraints:
cypher
DROP CONSTRAINT RATED_timestamp_exists;
DROP CONSTRAINT Movie_released_title_unique
Summary
In this challenge, you demonstrated that you can drop selected constraints from the graph. In the next module, you will learn about creating and managing indexes in the graph.