Why this change is needed: 1. Added clarifying comments to _pg_migrate_workspace_data() parameter handling 2. Removed dead code from PGDocStatusStorage.initialize() that was never executed Changes: 1. PostgreSQL Migration Parameter Documentation (lightrag/kg/postgres_impl.py:2240-2241): - Added comments explaining dict rebuild for correct value ordering - Clarifies that Python 3.7+ dict insertion order is relied upon - Documents that execute() converts dict to tuple via .values() 2. Dead Code Removal (lightrag/kg/postgres_impl.py:3061-3062): - Removed unreachable table creation code from PGDocStatusStorage.initialize() - Table is already created by PostgreSQLDB.initdb() during initialization - This code path was never executed as table always exists before initialize() is called - Added NOTE comment explaining where table creation actually happens Impact: - No functional changes - only code clarification and cleanup - Reduces maintenance burden by removing unreachable code - Improves code readability with better documentation Testing: - All 14 PostgreSQL migration tests pass - All 5 UnifiedLock safety tests pass - Pre-commit checks pass (ruff-format, ruff) |
||
|---|---|---|
| .. | ||
| api | ||
| evaluation | ||
| kg | ||
| llm | ||
| tools | ||
| __init__.py | ||
| base.py | ||
| constants.py | ||
| exceptions.py | ||
| lightrag.py | ||
| namespace.py | ||
| operate.py | ||
| prompt.py | ||
| rerank.py | ||
| types.py | ||
| utils.py | ||
| utils_graph.py | ||