Adding toggle to Channel page to stop downloading comments for certain channels.

This commit is contained in:
Roland 2025-02-19 14:52:50 -07:00
parent 47d4d72bf8
commit 581d5eaf6e
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
20 changed files with 150 additions and 77 deletions

View file

@ -0,0 +1,31 @@
"""Channel.download_missing_data
Revision ID: f7229a67e333
Revises: dc6637ced17b
Create Date: 2025-02-19 14:02:57.952791
"""
import os
from alembic import op
from sqlalchemy.orm import Session
# revision identifiers, used by Alembic.
revision = 'f7229a67e333'
down_revision = 'dc6637ced17b'
branch_labels = None
depends_on = None
DOCKERIZED = True if os.environ.get('DOCKER', '').lower().startswith('t') else False
def upgrade():
bind = op.get_bind()
session = Session(bind=bind)
session.execute('ALTER TABLE channel ADD COLUMN IF NOT EXISTS download_missing_data BOOLEAN DEFAULT True')
def downgrade():
bind = op.get_bind()
session = Session(bind=bind)
session.execute('ALTER TABLE channel DROP COLUMN IF EXISTS download_missing_data')