"""add permission sets to portfolio_role

Revision ID: 938a31795096
Revises: db161adbafdf
Create Date: 2019-03-07 06:13:05.400911

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

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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('portfolio_roles_roles',
    sa.Column('portfolio_role_id', postgresql.UUID(as_uuid=True), nullable=True),
    sa.Column('role_id', postgresql.UUID(as_uuid=True), nullable=True),
    sa.ForeignKeyConstraint(['portfolio_role_id'], ['portfolio_roles.id'], ),
    sa.ForeignKeyConstraint(['role_id'], ['roles.id'], )
    )
    # ### end Alembic commands ###


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