Auto-mode commit 7aa33cd accidentally deleted 78 files (14,814 lines) during M005
execution. Subsequent commits rebuilt some frontend files but backend/, alembic/,
tests/, whisper/, docker configs, and prompts were never restored in this repo.
This commit restores the full project tree by syncing from ub01's working directory,
which has all M001-M007 features running in production containers.
Restored: backend/ (config, models, routers, database, redis, search_service, worker),
alembic/ (6 migrations), docker/ (Dockerfiles, nginx, compose), prompts/ (4 stages),
tests/, whisper/, README.md, .env.example, chrysopedia-spec.md
29 lines
670 B
Python
29 lines
670 B
Python
"""Add content_hash to source_videos for duplicate detection.
|
|
|
|
Revision ID: 005_content_hash
|
|
Revises: 004_pipeline_events
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision = "005_content_hash"
|
|
down_revision = "004_pipeline_events"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column(
|
|
"source_videos",
|
|
sa.Column("content_hash", sa.String(64), nullable=True),
|
|
)
|
|
op.create_index(
|
|
"ix_source_videos_content_hash",
|
|
"source_videos",
|
|
["content_hash"],
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_index("ix_source_videos_content_hash")
|
|
op.drop_column("source_videos", "content_hash")
|