pyfedi/migrations/versions/9df13396fd54_extra_field_length.py

39 lines
1 KiB
Python
Raw Normal View History

2024-12-31 18:39:39 -08:00
"""extra field length
Revision ID: 9df13396fd54
Revises: 8758c0a94f82
Create Date: 2025-01-01 15:30:42.165900
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '9df13396fd54'
down_revision = '8758c0a94f82'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('user_extra_field', schema=None) as batch_op:
batch_op.alter_column('text',
existing_type=sa.VARCHAR(length=256),
type_=sa.String(length=1024),
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('user_extra_field', schema=None) as batch_op:
batch_op.alter_column('text',
existing_type=sa.String(length=1024),
type_=sa.VARCHAR(length=256),
existing_nullable=True)
# ### end Alembic commands ###