"""AlterRewardsOnUserRewardTable

Revision ID: <KEY>
Revises: <PASSWORD>
Create Date: 2022-03-03 16:12:17.497790

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

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '1<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('airdrop', 'stakable_token_name')
    op.alter_column('claim_history', 'claimable_amount',
               existing_type=mysql.INTEGER(display_width=11),
               type_=sa.DECIMAL(precision=64, scale=0),
               existing_nullable=False)
    op.alter_column('claim_history', 'unclaimed_amount',
               existing_type=mysql.INTEGER(display_width=11),
               type_=sa.DECIMAL(precision=64, scale=0),
               existing_nullable=False)
    op.alter_column('user_rewards', 'rewards_awarded',
               existing_type=mysql.VARCHAR(length=50),
               type_=sa.DECIMAL(precision=64, scale=0),
               existing_nullable=False)
    op.alter_column('user_rewards_audit', 'rewards_awarded',
               existing_type=mysql.VARCHAR(length=50),
               type_=sa.DECIMAL(precision=64, scale=0),
               existing_nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('user_rewards_audit', 'rewards_awarded',
               existing_type=sa.DECIMAL(precision=64, scale=0),
               type_=mysql.VARCHAR(length=50),
               existing_nullable=False)
    op.alter_column('user_rewards', 'rewards_awarded',
               existing_type=sa.DECIMAL(precision=64, scale=0),
               type_=mysql.VARCHAR(length=50),
               existing_nullable=False)
    op.alter_column('claim_history', 'unclaimed_amount',
               existing_type=sa.DECIMAL(precision=64, scale=0),
               type_=mysql.INTEGER(display_width=11),
               existing_nullable=False)
    op.alter_column('claim_history', 'claimable_amount',
               existing_type=sa.DECIMAL(precision=64, scale=0),
               type_=mysql.INTEGER(display_width=11),
               existing_nullable=False)
    op.add_column('airdrop', sa.Column('stakable_token_name', mysql.VARCHAR(length=50), nullable=True))
    # ### end Alembic commands ###

"""AlterRewardsOnUserRewardTable

Revision ID: <KEY>
Revises: <PASSWORD>
Create Date: 2022-03-03 16:12:17.497790

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

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '1<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('airdrop', 'stakable_token_name')
    op.alter_column('claim_history', 'claimable_amount',
               existing_type=mysql.INTEGER(display_width=11),
               type_=sa.DECIMAL(precision=64, scale=0),
               existing_nullable=False)
    op.alter_column('claim_history', 'unclaimed_amount',
               existing_type=mysql.INTEGER(display_width=11),
               type_=sa.DECIMAL(precision=64, scale=0),
               existing_nullable=False)
    op.alter_column('user_rewards', 'rewards_awarded',
               existing_type=mysql.VARCHAR(length=50),
               type_=sa.DECIMAL(precision=64, scale=0),
               existing_nullable=False)
    op.alter_column('user_rewards_audit', 'rewards_awarded',
               existing_type=mysql.VARCHAR(length=50),
               type_=sa.DECIMAL(precision=64, scale=0),
               existing_nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('user_rewards_audit', 'rewards_awarded',
               existing_type=sa.DECIMAL(precision=64, scale=0),
               type_=mysql.VARCHAR(length=50),
               existing_nullable=False)
    op.alter_column('user_rewards', 'rewards_awarded',
               existing_type=sa.DECIMAL(precision=64, scale=0),
               type_=mysql.VARCHAR(length=50),
               existing_nullable=False)
    op.alter_column('claim_history', 'unclaimed_amount',
               existing_type=sa.DECIMAL(precision=64, scale=0),
               type_=mysql.INTEGER(display_width=11),
               existing_nullable=False)
    op.alter_column('claim_history', 'claimable_amount',
               existing_type=sa.DECIMAL(precision=64, scale=0),
               type_=mysql.INTEGER(display_width=11),
               existing_nullable=False)
    op.add_column('airdrop', sa.Column('stakable_token_name', mysql.VARCHAR(length=50), nullable=True))
    # ### end Alembic commands ###

AlterRewardsOnUserRewardTable  Revision ID: <KEY> Revises: <PASSWORD> Create Date: 2022-03-03 16:12:17.497790 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###