"""added import from table

Revision ID: 214b12ad3201
Revises: 7719d1979813
Create Date: 2020-11-04 11:47:33.922982

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '214b12ad3201'
down_revision = '7719d1979813'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('import_from',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=250), nullable=True),
    sa.Column('module_from_id', sa.Integer(), nullable=True),
    sa.Column('module_to_id', sa.Integer(), nullable=True),
    sa.Column('target_name', sa.String(length=250), nullable=True),
    sa.Column('target_asname', sa.String(length=250), nullable=True),
    sa.Column('target_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['module_from_id'], ['module.id'], ),
    sa.ForeignKeyConstraint(['module_to_id'], ['module.id'], ),
    sa.ForeignKeyConstraint(['target_id'], ['definition.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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