constraint_command = "CREATE CONSTRAINT ID ON (n:" + label + ") ASSERT n.ID IS UNIQUE"
My database may already have such a constraint. Before my program executes this statement, I need a way to tell whether it already had this constraint. It seems in Neo4j 3.5, it didn't complain even if it already exits. But in 4.0, it gives this error message:
neobolt.exceptions.ClientError: An equivalent constraint already exists, 'Constraint( UNIQUE, :Product(ID) )'.
How to check before creating it?