soft deletes available for applications and environments
- parent relation will not include applications or environments marked as deleted - domain classes will exclude deleted objects from selections - changed some test factories to use domain_word for resource names, because they were using person names and it bugged me
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
"""add soft delete to applications and environments
|
||||
|
||||
Revision ID: fd0cf917f682
|
||||
Revises: 32438a35cfb5
|
||||
Create Date: 2019-04-09 06:16:15.445951
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.sql import expression
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'fd0cf917f682'
|
||||
down_revision = '32438a35cfb5'
|
||||
branch_labels = None
|
||||
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()))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('environments', 'deleted')
|
||||
op.drop_column('applications', 'deleted')
|
||||
# ### end Alembic commands ###
|
Reference in New Issue
Block a user