87d1b9d935
- Create alembic.ini and migrations/env.py for full Alembic CLI + programmatic support - Add Alembic migration 006: detail column on processing_logs - Add Alembic migration 007: ocr_quality_score column + drop unique filehash index - Add Alembic migration 008: performance indexes - Replace _run_schema_migrations() call in init_db() with _run_alembic_upgrade() - Deprecate _run_schema_migrations() with DeprecationWarning - Update tests for new Alembic-based approach and deprecation - Update DatabaseConfiguration.md documentation Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
28 lines
721 B
Python
28 lines
721 B
Python
"""Add detail column to processing_logs table
|
|
|
|
Revision ID: 006_add_detail_column
|
|
Revises: 005_add_saved_searches
|
|
Create Date: 2026-03-01
|
|
|
|
"""
|
|
|
|
from typing import Union
|
|
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = "006_add_detail_column"
|
|
down_revision: Union[str, None] = "005_add_saved_searches"
|
|
depends_on: Union[str, None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
"""Add detail column to processing_logs table for verbose worker log output."""
|
|
op.add_column("processing_logs", sa.Column("detail", sa.Text(), nullable=True))
|
|
|
|
|
|
def downgrade() -> None:
|
|
"""Remove detail column from processing_logs table."""
|
|
op.drop_column("processing_logs", "detail")
|