744 B
744 B
Neo4j Version Compatibility Notes
Neo4j had significant breaking changes between version 4.x and 5.x regarding schema introspection:
Neo4j 5.x+ (current):
- Use
SHOW INDEXESinstead ofCALL db.indexes() - Use
SHOW CONSTRAINTSinstead ofCALL db.constraints() - Use
CALL db.schema.visualization()for full schema (works in both versions)
Neo4j 4.x and earlier:
- Use
CALL db.indexes() - Use
CALL db.constraints()
Safe queries that work across versions:
CALL db.schema.visualization()- Full schema visualizationCALL db.labels()- Get all node labelsCALL db.relationshipTypes()- Get all relationship types
When querying indexes or constraints, prefer the SHOW commands for Neo4j 5+ environments.