"""refactoring

Revision ID: d2bf296ce170
Revises: edcc52ee4f96
Create Date: 2020-05-24 02:29:24.830707

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd2bf296ce170'
down_revision = 'edcc52ee4f96'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('wallet', 'user_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('wallethistory', 'balance',
               existing_type=sa.BIGINT(),
               nullable=False)
    op.alter_column('wallethistory', 'user_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('wallethistory', 'wallet_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('wallethistory', 'wallet_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('wallethistory', 'user_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('wallethistory', 'balance',
               existing_type=sa.BIGINT(),
               nullable=True)
    op.alter_column('wallet', 'user_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    # ### end Alembic commands ###
