Files
kiskaadee 4b4ba20ef8 feat(worker): implement async SQLite WAL engine, ORM model, and Alembic migrations
- Build async SQLAlchemy engine with PRAGMA journal_mode=WAL, foreign_keys=ON, and synchronous=NORMAL
- Implement DownloadJob ORM model with protobuf mapping and state transition guards
- Initialize Alembic async migrations and create initial download_jobs table schema
- Add unit test suite in tests/test_db.py covering WAL pragmas, CRUD, and state transitions
- Update todo.txt marking Priority (A) tasks complete
2026-10-13 07:26:27 -05:00

29 lines
704 B
Mako

"""${message}
Revision ID: ${up_revision}
Revises: ${down_revision | comma,n}
Create Date: ${create_date}
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
${imports if imports else ""}
# revision identifiers, used by Alembic.
revision: str = ${repr(up_revision)}
down_revision: Union[str, Sequence[str], None] = ${repr(down_revision)}
branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)}
depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)}
def upgrade() -> None:
"""Upgrade schema."""
${upgrades if upgrades else "pass"}
def downgrade() -> None:
"""Downgrade schema."""
${downgrades if downgrades else "pass"}