"""create table compra

Revision ID: 9e0b746dc8b1
Revises: e560a7e3a1e4
Create Date: 2020-09-05 15:37:40.153713

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '9e0b746dc8b1'
down_revision = 'e560a7e3a1e4'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('compra',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('fornecedor_id', sa.Integer(), nullable=True),
    sa.Column('valor', sa.Numeric(precision=10, scale=2), nullable=True),
    sa.Column('data', sa.Date(), nullable=True),
    sa.Column('observacao', sa.String(length=256), nullable=True),
    sa.ForeignKeyConstraint(['fornecedor_id'], ['fornecedor.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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