feat: migrate persistence from JSON to SQLModel (Phase 1)
CI / Test (Python 3.11) (push) Has been cancelled
CI / Test (Python 3.12) (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Type Check (push) Has been cancelled
CI / Summary (push) Has been cancelled

- Integrated SQLModel with SQLite for robust data persistence
- Refactored UserManager and WatchlistManager to use SQL queries
- Migrated models to SQLModel with relationships and primary keys
- Updated test suite with in-memory database isolation
- Removed deprecated JSON storage files
This commit is contained in:
root
2026-03-24 10:40:36 +00:00
parent d4d8d8a3b6
commit 29c7040b20
13 changed files with 596 additions and 1165 deletions
+5
View File
@@ -52,6 +52,11 @@ episode_checker.set_download_manager(download_manager)
@app.on_event("startup")
async def startup_event():
"""Initialize services on application startup"""
# Create database tables if they don't exist
from app.database import create_db_and_tables
create_db_and_tables()
logger.info("Database tables initialized")
from app.sonarr_handler import get_sonarr_handler
sonarr_handler = get_sonarr_handler()