pyfedi/migrations/versions/2191fa36c09d_increase_alt_text_length.py
rimu bbf345e689 increase alt text max length
same as Lemmy and Mastodon
2024-05-25 22:44:43 +12:00

38 lines
1 KiB
Python

"""increase alt text length
Revision ID: 2191fa36c09d
Revises: dfba54bdaeb2
Create Date: 2024-05-25 22:43:40.203295
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2191fa36c09d'
down_revision = 'dfba54bdaeb2'
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=300),
type_=sa.String(length=1500),
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=1500),
type_=sa.VARCHAR(length=300),
existing_nullable=True)
# ### end Alembic commands ###