mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
Introduces SQLModel (SQLAlchemy + Pydantic) as an ORM layer to enable future database backend switching (PostgreSQL, MySQL). All services except session_queue have been migrated to SQLModel-based implementations while keeping the existing migration system and raw SQLite connection intact for backwards compatibility. Key changes: - Add sqlmodel dependency - Define SQLModel table models for all 14 database tables - Extend SqliteDatabase with SQLAlchemy Engine and Session management - Create SQLModel implementations for 10 services (boards, images, workflows, models, users, style presets, app settings, etc.) - Session queue remains on raw SQLite (Phase 3) - Add 95 unit tests and 12 performance benchmarks - Optimize with StaticPool, expire_on_commit=False, and read-only sessions