# -*- encoding: utf-8 -*-
# flake8: noqa
"""add market order model

Revision ID: 2
Revises: 1
Create Date: 2020-01-04 23:18:41.968358

"""
from alembic import op
import sqlalchemy as sa
import lazyblacksmith


# revision identifiers, used by Alembic.
revision = '2'
down_revision = '1'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('market_order',
    sa.Column('order_id', sa.Integer(), autoincrement=False, nullable=False),
    sa.Column('item_id', sa.Integer(), nullable=True),
    sa.Column('region_id', sa.Integer(), nullable=True),
    sa.Column('system_id', sa.Integer(), nullable=True),
    sa.Column('price', sa.Numeric(precision=17, scale=2, decimal_return_scale=2, asdecimal=False), nullable=True),
    sa.Column('is_buy_order', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('order_id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('market_order')
    # ### end Alembic commands ###

# -*- encoding: utf-8 -*-
# flake8: noqa
"""add market order model

Revision ID: 2
Revises: 1
Create Date: 2020-01-04 23:18:41.968358

"""
from alembic import op
import sqlalchemy as sa
import lazyblacksmith


# revision identifiers, used by Alembic.
revision = '2'
down_revision = '1'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('market_order',
    sa.Column('order_id', sa.BigInteger(), autoincrement=False, nullable=False),
    sa.Column('item_id', sa.Integer(), nullable=True),
    sa.Column('region_id', sa.Integer(), nullable=True),
    sa.Column('system_id', sa.Integer(), nullable=True),
    sa.Column('price', sa.Numeric(precision=17, scale=2, decimal_return_scale=2, asdecimal=False), nullable=True),
    sa.Column('is_buy_order', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('order_id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('market_order')
    # ### end Alembic commands ###

fix migration type