mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
34 lines
964 B
Python
34 lines
964 B
Python
"""comment length
|
|
|
|
Revision ID: e76f2067e689
|
|
Revises: 05e3a7023a1e
|
|
Create Date: 2024-05-21 21:58:22.133194
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'e76f2067e689'
|
|
down_revision = '05e3a7023a1e'
|
|
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('average_comment_length', sa.Integer(), nullable=True))
|
|
batch_op.add_column(sa.Column('comment_length_warning', sa.Integer(), 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('comment_length_warning')
|
|
batch_op.drop_column('average_comment_length')
|
|
|
|
# ### end Alembic commands ###
|