"""ADD parent_id to comment

Revision ID: 400b53e79568
Revises: df5aa182233f
Create Date: 2022-01-17 14:40:22.822728

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision = "400b53e79568"
down_revision = "df5aa182233f"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "forum_post_comment",
        sa.Column("parent_id", sa.String(length=128), nullable=True),
    )
    op.drop_column("forum_post_comment", "next_id")
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "forum_post_comment",
        sa.Column("next_id", mysql.VARCHAR(length=128), nullable=True),
    )
    op.drop_column("forum_post_comment", "parent_id")
    # ### end Alembic commands ###
