summaryrefslogtreecommitdiff
path: root/migrations/versions/dd0766afb7d2_store_user_agent_string_with_files.py
blob: 914d31a6e5b5d3e4658805d478c78d64cca414b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""Store user agent string with files

Revision ID: dd0766afb7d2
Revises: 30bfe33aa328
Create Date: 2023-03-29 07:18:49.113200

"""

# revision identifiers, used by Alembic.
revision = 'dd0766afb7d2'
down_revision = '30bfe33aa328'

from alembic import op
import sqlalchemy as sa


def upgrade():
    with op.batch_alter_table('file', schema=None) as batch_op:
        batch_op.add_column(sa.Column('ua', sa.UnicodeText(), nullable=True))


def downgrade():
    with op.batch_alter_table('file', schema=None) as batch_op:
        batch_op.drop_column('ua')