pyfedi/migrations/versions/e72aa356e4d0_increase_alt_text_length.py
2024-03-04 12:13:14 +13:00

38 lines
1 KiB
Python

"""increase alt text length
Revision ID: e72aa356e4d0
Revises: a88efa63415b
Create Date: 2024-03-04 12:12:07.458127
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e72aa356e4d0'
down_revision = 'a88efa63415b'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('file', schema=None) as batch_op:
batch_op.alter_column('alt_text',
existing_type=sa.VARCHAR(length=256),
type_=sa.String(length=300),
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('file', schema=None) as batch_op:
batch_op.alter_column('alt_text',
existing_type=sa.String(length=300),
type_=sa.VARCHAR(length=256),
existing_nullable=True)
# ### end Alembic commands ###