pyfedi/migrations/versions/98680738ebb0_ban_comments.py
2024-12-02 13:48:10 +13:00

34 lines
916 B
Python

"""ban comments
Revision ID: 98680738ebb0
Revises: 20a3bae71dd7
Create Date: 2024-12-02 13:46:32.356061
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '98680738ebb0'
down_revision = '20a3bae71dd7'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('user', schema=None) as batch_op:
batch_op.add_column(sa.Column('ban_posts', sa.Boolean(), nullable=True))
batch_op.add_column(sa.Column('ban_comments', sa.Boolean(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('user', schema=None) as batch_op:
batch_op.drop_column('ban_comments')
batch_op.drop_column('ban_posts')
# ### end Alembic commands ###