"""Add password_hash

Revision ID: 1d1bb2639272
Revises: 8747066ce416
Create Date: 2020-05-28 14:04:37.641791

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

# revision identifiers, used by Alembic.
revision = '1d1bb2639272'
down_revision = '8747066ce416'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        'user',
        column_name='pw_hash',
        nullable=False,
        existing_type=sa.String(80),
        new_column_name='password_hash'
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        'user',
        column_name='password_hash',
        nullable=False,
        existing_type=sa.String(80),
        new_column_name='pw_hash'
    )
    # ### end Alembic commands ###
