"""add_owner_id_column_in_asset_table

Revision ID: 8abe32ffa204
Revises: 3d56402cde15
Create Date: 2018-04-23 16:54:45.199226

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "8abe32ffa204"
down_revision = "3d56402cde15"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("asset", sa.Column("owner_id", sa.Integer(), nullable=True))
    op.create_foreign_key(None, "asset", "bvp_users", ["owner_id"], ["id"])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, "asset", type_="foreignkey")
    op.drop_column("asset", "owner_id")
    # ### end Alembic commands ###
