"""merge user's first_/last_name into full_name

Revision ID: 6f1c1b83870a
Revises: 7a82e0c70122
Create Date: 2019-05-22 15:52:57.173180

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "6f1c1b83870a"
down_revision = "7a82e0c70122"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("users", sa.Column("full_name", sa.String(length=64), nullable=True))
    op.drop_column("users", "last_name")
    op.drop_column("users", "first_name")
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "users", sa.Column("first_name", sa.VARCHAR(length=32), autoincrement=False, nullable=True)
    )
    op.add_column(
        "users", sa.Column("last_name", sa.VARCHAR(length=32), autoincrement=False, nullable=True)
    )
    op.drop_column("users", "full_name")
    # ### end Alembic commands ###
