Using v2 py2neo I could put this in __init__.py
graph.cypher.execute("CREATE CONSTRAINT ON (n:User) ASSERT n.username IS UNIQUE")
Why does v3 py2neo
graph.run("CREATE CONSTRAINT ON (n:User) ASSERT n.username IS UNIQUE")
fail with this error?
TypeError: unbound method run() must be called with Graph instance as first argument (got str instance instead)