- Introduced `neo4j-schema-init.py` for creating the foundational schema for the personal knowledge graph used by multiple AI assistants. - Implemented functionality for creating constraints, indexes, and sample nodes, along with comprehensive testing of the schema. - Added `neo4j-validate.py` to perform validation checks on the Neo4j knowledge graph, including constraints, indexes, sample nodes, relationships, and junk data detection. - Enhanced logging for better traceability and debugging during schema initialization and validation processes.
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.