mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-05 06:09:57 -05:00
Adding toggle to Channel page to stop downloading comments for certain channels.
This commit is contained in:
parent
47d4d72bf8
commit
581d5eaf6e
20 changed files with 150 additions and 77 deletions
|
|
@ -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')
|
||||
Loading…
Add table
Add a link
Reference in a new issue