extend soft delete functionality to app and env roles

This commit is contained in:
dandds
2019-04-10 10:42:36 -04:00
parent dac764ab82
commit 0bde431a70
15 changed files with 81 additions and 35 deletions

View File

@@ -1,8 +1,8 @@
"""add soft delete to applications and environments
"""add soft delete to application and environment resources and roles
Revision ID: fd0cf917f682
Revision ID: 014e4bceb947
Revises: 32438a35cfb5
Create Date: 2019-04-09 06:16:15.445951
Create Date: 2019-04-10 09:40:37.688157
"""
from alembic import op
@@ -11,7 +11,7 @@ from sqlalchemy.sql import expression
# revision identifiers, used by Alembic.
revision = 'fd0cf917f682'
revision = '014e4bceb947'
down_revision = '32438a35cfb5'
branch_labels = None
depends_on = None
@@ -19,13 +19,17 @@ depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('applications', sa.Column('deleted', sa.Boolean(), nullable=False, server_default=expression.false()))
op.add_column('environments', sa.Column('deleted', sa.Boolean(), nullable=False, server_default=expression.false()))
op.add_column('application_roles', sa.Column('deleted', sa.Boolean(), server_default=expression.false(), nullable=False))
op.add_column('applications', sa.Column('deleted', sa.Boolean(), server_default=expression.false(), nullable=False))
op.add_column('environment_roles', sa.Column('deleted', sa.Boolean(), server_default=expression.false(), nullable=False))
op.add_column('environments', sa.Column('deleted', sa.Boolean(), server_default=expression.false(), nullable=False))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('environments', 'deleted')
op.drop_column('environment_roles', 'deleted')
op.drop_column('applications', 'deleted')
op.drop_column('application_roles', 'deleted')
# ### end Alembic commands ###