add join table between portfolio_roles and roles

This commit is contained in:
dandds
2019-03-07 06:22:23 -05:00
parent b711330b9e
commit 31bcb662b5
2 changed files with 44 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
"""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 ###