pyfedi/migrations/versions/7f7dfd4d4f1b_increase_length_of_ban_reason.py

39 lines
1 KiB
Python
Raw Permalink Normal View History

2024-11-22 21:48:03 -08:00
"""increase length of ban reason
Revision ID: 7f7dfd4d4f1b
Revises: d2bd6281a8d3
Create Date: 2024-11-23 18:47:41.698925
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7f7dfd4d4f1b'
down_revision = 'd2bd6281a8d3'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('community_ban', schema=None) as batch_op:
batch_op.alter_column('reason',
existing_type=sa.VARCHAR(length=50),
type_=sa.String(length=256),
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('community_ban', schema=None) as batch_op:
batch_op.alter_column('reason',
existing_type=sa.String(length=256),
type_=sa.VARCHAR(length=50),
existing_nullable=True)
# ### end Alembic commands ###