From 71ed6fc7af20312e8807d6f2acdbf74f454bddf6 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Thu, 23 May 2024 15:27:36 +1200 Subject: [PATCH] remove avg comment length experiment --- .../a32b474a40dd_remove_avg_comment_length.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 migrations/versions/a32b474a40dd_remove_avg_comment_length.py diff --git a/migrations/versions/a32b474a40dd_remove_avg_comment_length.py b/migrations/versions/a32b474a40dd_remove_avg_comment_length.py new file mode 100644 index 00000000..02d093bc --- /dev/null +++ b/migrations/versions/a32b474a40dd_remove_avg_comment_length.py @@ -0,0 +1,34 @@ +"""remove avg comment length + +Revision ID: a32b474a40dd +Revises: e76f2067e689 +Create Date: 2024-05-23 15:24:12.575063 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'a32b474a40dd' +down_revision = 'e76f2067e689' +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.drop_column('average_comment_length') + batch_op.drop_column('comment_length_warning') + + # ### 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.add_column(sa.Column('comment_length_warning', sa.INTEGER(), autoincrement=False, nullable=True)) + batch_op.add_column(sa.Column('average_comment_length', sa.INTEGER(), autoincrement=False, nullable=True)) + + # ### end Alembic commands ###