microblog.pub/alembic/versions/c8cbfccf885d_keep_track_of_poll_answers.py

33 lines
832 B
Python
Raw Normal View History

2022-07-23 17:02:06 +00:00
"""Keep track of poll answers
Revision ID: c8cbfccf885d
Revises: c9f204f5611d
Create Date: 2022-07-23 19:01:16.289953
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = 'c8cbfccf885d'
down_revision = 'c9f204f5611d'
branch_labels = None
depends_on = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('inbox', schema=None) as batch_op:
batch_op.add_column(sa.Column('voted_for_answers', sa.JSON(), nullable=True))
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('inbox', schema=None) as batch_op:
batch_op.drop_column('voted_for_answers')
# ### end Alembic commands ###