wrolpi/alembic/versions/c72d305cf11e_download_settings.py
Roland 287edad9e6
Adding Download.settings column in alembic migration.
Reformatting.

Switching excluded_urls to a generic Download.settings json.

Download workers filter excluded urls.
2022-10-14 13:08:39 -06:00

29 lines
610 B
Python

"""Download settings
Revision ID: c72d305cf11e
Revises: d2eace02f5b9
Create Date: 2022-10-14 13:00:30.333384
"""
from alembic import op
from sqlalchemy.orm import Session
# revision identifiers, used by Alembic.
revision = 'c72d305cf11e'
down_revision = 'd2eace02f5b9'
branch_labels = None
depends_on = None
def upgrade():
bind = op.get_bind()
session = Session(bind=bind)
session.execute('ALTER TABLE download ADD COLUMN settings JSONB')
def downgrade():
bind = op.get_bind()
session = Session(bind=bind)
session.execute('ALTER TABLE download DROP COLUMN IF EXISTS settings')