You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.0 KiB
Python

"""drop unused overlay tables
Revision ID: o6e7f8g9j0a1
Revises: n5d6e7f8h9i0
Create Date: 2026-04-26
Removes overlay subsystem tables that are no longer fed (wikimedia / youtube /
google_trends / feature_build / scoring were retired). Keeps:
- overlay_headline_events
- overlay_job_log
- company_aliases
"""
from typing import Sequence, Union
from alembic import op
revision: str = "o6e7f8g9j0a1"
down_revision: Union[str, Sequence[str], None] = "n5d6e7f8h9i0"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
_TABLES_TO_DROP = [
"overlay_feature_records",
"overlay_video_events",
"overlay_wiki_pageviews",
"overlay_trend_observations",
"youtube_channel_registry",
"wiki_page_map",
"theme_topic_map",
]
def upgrade() -> None:
conn = op.get_bind()
for tbl in _TABLES_TO_DROP:
if conn.dialect.has_table(conn, tbl):
op.drop_table(tbl)
def downgrade() -> None:
# One-way drop; recreate would require restoring the deleted models.
pass