Why this change is needed: Previously, PostgreSQL and Qdrant had inconsistent migration behavior: - PostgreSQL kept legacy tables after migration, requiring manual cleanup - Qdrant auto-deleted legacy collections after migration This inconsistency caused confusion for users and required different documentation for each backend. How it solves the problem: Unified both backends to follow the same smart cleanup strategy: - Case 1 (both exist): Auto-delete if legacy is empty, warn if has data - Case 4 (migration): Auto-delete legacy after successful verification This provides a fully automated migration experience without manual intervention. Impact: - Eliminates need for users to manually delete legacy tables/collections - Reduces storage waste from duplicate data - Provides consistent behavior across PostgreSQL and Qdrant - Simplifies documentation and user experience Testing: - All 16 unit tests pass (8 PostgreSQL + 8 Qdrant) - Added 4 new tests for Case 1 scenarios (empty vs non-empty legacy) - Updated E2E tests to verify auto-deletion behavior - All lint checks pass (ruff-format, ruff, trailing-whitespace) |
||
|---|---|---|
| .. | ||
| conftest.py | ||
| README_WORKSPACE_ISOLATION_TESTS.md | ||
| test_aquery_data_endpoint.py | ||
| test_base_storage_integrity.py | ||
| test_curl_aquery_data.sh | ||
| test_e2e_multi_instance.py | ||
| test_embedding_func.py | ||
| test_graph_storage.py | ||
| test_lightrag_ollama_chat.py | ||
| test_postgres_migration.py | ||
| test_postgres_retry_integration.py | ||
| test_qdrant_migration.py | ||
| test_workspace_isolation.py | ||
| test_write_json_optimization.py | ||