Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

Adjust imports in migration script and add docs.

Daniel Petti98bbe1b67f00
diff --git a/README.md b/README.md
index db931ac98c..397c4b65ac 100644
--- a/README.md
+++ b/README.md
@@ -68,6 +68,16 @@ For comprehensive Docker setup information, see:
- [Docker Usage Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/docker-usage-readme.md)
- [Docker Compose Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/docker-compose-guide.md)
+## Migrating from Version 0.1.0
+
+If you just upgraded from 0.1.0, and you want to preserve your configuration,
+you will need to manually migrate from the old config files to the new settings
+database:
+
+```bash
+python -m local_deep_research.migrate_db
+```
+
## Programmatic Access
Local Deep Research now provides a simple API for programmatic access to its research capabilities:
@@ -415,5 +425,6 @@ If you want to start with automatic migration if needed:
```
python -m src.local_deep_research.main --auto-migrate
```
-
-
+
+
+
diff --git a/src/local_deep_research/migrate_db.py b/src/local_deep_research/migrate_db.py
index 818740101d..1dad8f8b50 100644
--- a/src/local_deep_research/migrate_db.py
+++ b/src/local_deep_research/migrate_db.py
@@ -9,6 +9,24 @@ import logging
import os
import sys
+try:
+ from local_deep_research.web.database.migrate_to_ldr_db import (
+ migrate_to_ldr_db,
+ )
+ from local_deep_research.web.models.database import (
+ DB_PATH,
+ LEGACY_DEEP_RESEARCH_DB,
+ LEGACY_RESEARCH_HISTORY_DB,
+ )
+except ImportError:
+ # If that fails, try with the relative path.
+ from .web.database.migrate_to_ldr_db import migrate_to_ldr_db
+ from .web.models.database import (
+ DB_PATH,
+ LEGACY_DEEP_RESEARCH_DB,
+ LEGACY_RESEARCH_HISTORY_DB,
+ )
+
# Configure logging
logging.basicConfig(
level=logging.INFO,
@@ -55,20 +73,6 @@ def main():
try:
# First try the normal import
- try:
- from web.models.database import (
- DB_PATH,
- LEGACY_DEEP_RESEARCH_DB,
- LEGACY_RESEARCH_HISTORY_DB,
- )
- except ImportError:
- # If that fails, try with the full module path
- from src.local_deep_research.web.models.database import (
- DB_PATH,
- LEGACY_DEEP_RESEARCH_DB,
- LEGACY_RESEARCH_HISTORY_DB,
- )
-
print(f"Target database will be created at: {DB_PATH}")
# Check if migration is needed
@@ -120,7 +124,6 @@ def main():
return 0
else:
print(f"\nStarting migration to: {DB_PATH}")
- from web.database.migrate_to_ldr_db import migrate_to_ldr_db
success = migrate_to_ldr_db()
@@ -134,11 +137,6 @@ def main():
print("\nMigration failed. Check the logs for details.")
return 1
- except ImportError as e:
- logger.error(f"Import error: {e}")
- print("Error: Could not import required modules.")
- print("Make sure you're running this script from the correct directory.")
- return 1
except Exception as e:
logger.error(f"Migration error: {e}", exc_info=True)
print(f"Error during migration: {e}")