"""change precision of order amount

Revision ID: fb84527fc0b3
Revises: 5c6f2d25c2f0
Create Date: 2018-04-07 18:51:12.160012+00:00

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

# revision identifiers, used by Alembic.
revision = 'fb84527fc0b3'
down_revision = '5c6f2d25c2f0'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('order', 'amount',
                    existing_type=mysql.DECIMAL(precision=2, scale=0),
                    type_=sa.DECIMAL(precision=10),
                    existing_nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('order', 'amount',
                    existing_type=sa.DECIMAL(precision=10),
                    type_=mysql.DECIMAL(precision=2, scale=0),
                    existing_nullable=False)
    # ### end Alembic commands ###
