mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-17 15:13:24 +02:00
remove everything related to requests (#455)
This PR removes the requests feature. The functionality will be replaced either by Seerr or by reimplementing it in a better way.
This commit is contained in:
committed by
GitHub
parent
c2645000e5
commit
a643c9426d
@@ -30,14 +30,13 @@ from media_manager.auth.db import OAuthAccount, User # noqa: E402
|
||||
from media_manager.config import MediaManagerConfig # noqa: E402
|
||||
from media_manager.database import Base # noqa: E402
|
||||
from media_manager.indexer.models import IndexerQueryResult # noqa: E402
|
||||
from media_manager.movies.models import Movie, MovieFile, MovieRequest # noqa: E402
|
||||
from media_manager.movies.models import Movie, MovieFile # noqa: E402
|
||||
from media_manager.notification.models import Notification # noqa: E402
|
||||
from media_manager.torrent.models import Torrent # noqa: E402
|
||||
from media_manager.tv.models import ( # noqa: E402
|
||||
Episode,
|
||||
EpisodeFile,
|
||||
Season,
|
||||
SeasonRequest,
|
||||
Show,
|
||||
)
|
||||
|
||||
@@ -51,11 +50,9 @@ __all__ = [
|
||||
"IndexerQueryResult",
|
||||
"Movie",
|
||||
"MovieFile",
|
||||
"MovieRequest",
|
||||
"Notification",
|
||||
"OAuthAccount",
|
||||
"Season",
|
||||
"SeasonRequest",
|
||||
"Show",
|
||||
"Torrent",
|
||||
"User",
|
||||
|
||||
65
alembic/versions/e60ae827ed98_remove_requests.py
Normal file
65
alembic/versions/e60ae827ed98_remove_requests.py
Normal file
@@ -0,0 +1,65 @@
|
||||
"""remove requests
|
||||
|
||||
Revision ID: e60ae827ed98
|
||||
Revises: a6f714d3c8b9
|
||||
Create Date: 2026-02-22 18:07:12.866130
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = 'e60ae827ed98'
|
||||
down_revision: Union[str, None] = 'a6f714d3c8b9'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Upgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('movie_request')
|
||||
op.drop_table('season_request')
|
||||
op.alter_column('episode', 'overview',
|
||||
existing_type=sa.TEXT(),
|
||||
type_=sa.String(),
|
||||
existing_nullable=True)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
|
||||
op.create_table('season_request',
|
||||
sa.Column('id', sa.UUID(), autoincrement=False, nullable=False),
|
||||
sa.Column('season_id', sa.UUID(), autoincrement=False, nullable=False),
|
||||
sa.Column('wanted_quality', postgresql.ENUM('uhd', 'fullhd', 'hd', 'sd', 'unknown', name='quality'), autoincrement=False, nullable=False),
|
||||
sa.Column('min_quality', postgresql.ENUM('uhd', 'fullhd', 'hd', 'sd', 'unknown', name='quality'), autoincrement=False, nullable=False),
|
||||
sa.Column('requested_by_id', sa.UUID(), autoincrement=False, nullable=True),
|
||||
sa.Column('authorized', sa.BOOLEAN(), autoincrement=False, nullable=False),
|
||||
sa.Column('authorized_by_id', sa.UUID(), autoincrement=False, nullable=True),
|
||||
sa.ForeignKeyConstraint(['authorized_by_id'], ['user.id'], name=op.f('season_request_authorized_by_id_fkey'), ondelete='SET NULL'),
|
||||
sa.ForeignKeyConstraint(['requested_by_id'], ['user.id'], name=op.f('season_request_requested_by_id_fkey'), ondelete='SET NULL'),
|
||||
sa.ForeignKeyConstraint(['season_id'], ['season.id'], name=op.f('season_request_season_id_fkey'), ondelete='CASCADE'),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('season_request_pkey')),
|
||||
sa.UniqueConstraint('season_id', 'wanted_quality', name=op.f('season_request_season_id_wanted_quality_key'), postgresql_include=[], postgresql_nulls_not_distinct=False)
|
||||
)
|
||||
op.create_table('movie_request',
|
||||
sa.Column('id', sa.UUID(), autoincrement=False, nullable=False),
|
||||
sa.Column('movie_id', sa.UUID(), autoincrement=False, nullable=False),
|
||||
sa.Column('wanted_quality', postgresql.ENUM('uhd', 'fullhd', 'hd', 'sd', 'unknown', name='quality'), autoincrement=False, nullable=False),
|
||||
sa.Column('min_quality', postgresql.ENUM('uhd', 'fullhd', 'hd', 'sd', 'unknown', name='quality'), autoincrement=False, nullable=False),
|
||||
sa.Column('authorized', sa.BOOLEAN(), autoincrement=False, nullable=False),
|
||||
sa.Column('requested_by_id', sa.UUID(), autoincrement=False, nullable=True),
|
||||
sa.Column('authorized_by_id', sa.UUID(), autoincrement=False, nullable=True),
|
||||
sa.ForeignKeyConstraint(['authorized_by_id'], ['user.id'], name=op.f('movie_request_authorized_by_id_fkey'), ondelete='SET NULL'),
|
||||
sa.ForeignKeyConstraint(['movie_id'], ['movie.id'], name=op.f('movie_request_movie_id_fkey'), ondelete='CASCADE'),
|
||||
sa.ForeignKeyConstraint(['requested_by_id'], ['user.id'], name=op.f('movie_request_requested_by_id_fkey'), ondelete='SET NULL'),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('movie_request_pkey')),
|
||||
sa.UniqueConstraint('movie_id', 'wanted_quality', name=op.f('movie_request_movie_id_wanted_quality_key'), postgresql_include=[], postgresql_nulls_not_distinct=False)
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user