feat: add database module
- Add SQLAlchemy database module with DeclarativeBase - Implement engine and session factory management - Add context manager for database sessions - Add database initialization script - Update models/__init__.py to import Base from database - Fix Python 3.8 compatibility issues (use Optional instead of |) - Ensure SQLite database file is created on init_db Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,3 @@
|
||||
"""ORM Models.
|
||||
from app.database import Base
|
||||
|
||||
NOTE: This module is a placeholder until Task 2.1.
|
||||
The Base class is needed by conftest.py for database fixtures.
|
||||
"""
|
||||
|
||||
from sqlalchemy.orm import DeclarativeBase
|
||||
|
||||
class Base(DeclarativeBase):
|
||||
"""Base class for all ORM models."""
|
||||
pass
|
||||
__all__ = ['Base']
|
||||
|
||||
Reference in New Issue
Block a user