Skip to content

Commit

Permalink
add alembic migration for new deleted columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Allie Crevier committed Oct 13, 2021
1 parent 3ffdbe8 commit dd30f06
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions alembic/versions/476b3a500029_add_deleted_column_for_pending_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""add deleted column for pending operations
Revision ID: 476b3a500029
Revises: bd57477f19a2
Create Date: 2021-10-12 17:27:42.670143
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '476b3a500029'
down_revision = 'bd57477f19a2'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('files', sa.Column('deleted', sa.Boolean(name='deleted'), server_default=sa.text('0'), nullable=False))
op.add_column('messages', sa.Column('deleted', sa.Boolean(name='deleted'), server_default=sa.text('0'), nullable=False))
op.add_column('replies', sa.Column('deleted', sa.Boolean(name='deleted'), server_default=sa.text('0'), nullable=False))
op.add_column('sources', sa.Column('deleted', sa.Boolean(name='deleted'), server_default=sa.text('0'), nullable=False))
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('sources', 'deleted')
op.drop_column('replies', 'deleted')
op.drop_column('messages', 'deleted')
op.drop_column('files', 'deleted')
# ### end Alembic commands ###

0 comments on commit dd30f06

Please sign in to comment.