-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add alembic migration for new deleted columns
- Loading branch information
Allie Crevier
committed
Oct 13, 2021
1 parent
3ffdbe8
commit dd30f06
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
alembic/versions/476b3a500029_add_deleted_column_for_pending_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ### |