"""Initial migration.

Revision ID: 843851554271
Revises: 
Create Date: 2021-07-02 23:17:58.735337

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_foreign_key(None, 'IP__pools', 'user', ['user_id'], ['id'])
    op.create_foreign_key(None, 'IP__pools', 'hypervisor', ['hypervisor'], ['id'])
    op.drop_column('IP__pools', 'interface_name')
    op.drop_column('IP__pools', 'bridge_name')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('IP__pools', sa.Column('bridge_name', sa.VARCHAR(length=60), nullable=True))
    op.add_column('IP__pools', sa.Column('interface_name', sa.VARCHAR(length=15), nullable=True))
    op.drop_constraint(None, 'IP__pools', type_='foreignkey')
    op.drop_constraint(None, 'IP__pools', type_='foreignkey')
    # ### end Alembic commands ###
