"""remove portfolio_roles role_id

Revision ID: 0e71ab219ada
Revises: 938a31795096
Create Date: 2019-03-12 05:58:17.029899

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = '0e71ab219ada'
down_revision = '938a31795096'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('workspace_roles_role_id_fkey', 'portfolio_roles', type_='foreignkey')
    op.drop_column('portfolio_roles', 'role_id')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('portfolio_roles', sa.Column('role_id', postgresql.UUID(), autoincrement=False, nullable=True))
    op.create_foreign_key('workspace_roles_role_id_fkey', 'portfolio_roles', 'roles', ['role_id'], ['id'])
    # ### end Alembic commands ###
