Add Neo4j schema initialization and validation scripts
- 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.
This commit is contained in:
19
docs/Neo4j-breaking-changes.md
Normal file
19
docs/Neo4j-breaking-changes.md
Normal file
@@ -0,0 +1,19 @@
|
||||
## 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 INDEXES` instead of `CALL db.indexes()`
|
||||
- Use `SHOW CONSTRAINTS` instead of `CALL 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 visualization
|
||||
- `CALL db.labels()` - Get all node labels
|
||||
- `CALL db.relationshipTypes()` - Get all relationship types
|
||||
|
||||
When querying indexes or constraints, prefer the `SHOW` commands for Neo4j 5+ environments.
|
||||
Reference in New Issue
Block a user