goon/alembic/versions/20260512_0017_drop_realdebrid_cache.py
goon-foss ad0284585b Initial commit
Goon — self-hosted aggregator for adult-content scene metadata.

Indexes scenes from TPDB, StashDB, and 30+ public adult tube sites.
Cross-source deduplication via perceptual hash + Levenshtein distance.
FastAPI backend + APScheduler worker + React Native (Expo) mobile client.

FOSS, ad-free, donation-funded. See README for details.
2026-05-20 10:10:22 +02:00

37 lines
1.4 KiB
Python

"""drop realdebrid_cache table — RD nie wykorzystywany (Hetzner IP blocked)
Revision ID: 0017_drop_realdebrid_cache
Revises: 0016_realdebrid_cache
Create Date: 2026-05-12
Real-Debrid integration cofnięta — Hetzner VPS IP blokowany globalnie przez
RD anti-abuse, a 95% relevantnych hosterów (streamtape/playmogo/dood/mixdrop/
filemoon/iceyfile) są DOWN lub UNSUPPORTED w RD list. Tylko voe.sx + file
hosters UP, nie pokrywa naszego streaming use case.
"""
from collections.abc import Sequence
import sqlalchemy as sa
from alembic import op
revision: str = "0017_drop_realdebrid_cache"
down_revision: str | None = "0016_realdebrid_cache"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None
def upgrade() -> None:
op.drop_index("ix_realdebrid_cache_expires_at", table_name="realdebrid_cache")
op.drop_table("realdebrid_cache")
def downgrade() -> None:
op.create_table(
"realdebrid_cache",
sa.Column("hoster_url", sa.Text(), primary_key=True),
sa.Column("direct_url", sa.Text(), nullable=False),
sa.Column("created_at", sa.TIMESTAMP(timezone=True), nullable=False,
server_default=sa.text("now()")),
sa.Column("expires_at", sa.TIMESTAMP(timezone=True), nullable=False),
)
op.create_index("ix_realdebrid_cache_expires_at", "realdebrid_cache", ["expires_at"])