Fix workspace_role workspace relationship

This commit is contained in:
richard-dds
2018-08-20 10:52:04 -04:00
parent a438e409ba
commit 43263f35cc
4 changed files with 45 additions and 16 deletions

View File

@@ -0,0 +1,28 @@
"""add workspace_role workspace_id fk
Revision ID: f36f130622b9
Revises: f064247f2988
Create Date: 2018-08-20 10:36:23.920881
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'f36f130622b9'
down_revision = 'f064247f2988'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_foreign_key('workspace_role_workspace_id_fk', 'workspace_role', 'workspaces', ['workspace_id'], ['id'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint('workspace_role_workspace_id_fk', 'workspace_role', type_='foreignkey')
# ### end Alembic commands ###