Blame alembic/versions/e34e799e4182_add_reactions_to_issue_comments.py
|
Lubomír Sedlář |
59889e |
"""add_reactions_to_comments
|
|
Lubomír Sedlář |
59889e |
|
|
Lubomír Sedlář |
59889e |
Revision ID: e34e799e4182
|
|
Lubomír Sedlář |
59889e |
Revises: 131ad2dc5bbd
|
|
Lubomír Sedlář |
59889e |
Create Date: 2018-05-17 18:44:32.189208
|
|
Lubomír Sedlář |
59889e |
|
|
Lubomír Sedlář |
59889e |
"""
|
|
Lubomír Sedlář |
59889e |
|
|
Lubomír Sedlář |
59889e |
# revision identifiers, used by Alembic.
|
|
Lubomír Sedlář |
59889e |
revision = 'e34e799e4182'
|
|
Lubomír Sedlář |
59889e |
down_revision = '131ad2dc5bbd'
|
|
Lubomír Sedlář |
59889e |
|
|
Lubomír Sedlář |
59889e |
from alembic import op
|
|
Lubomír Sedlář |
59889e |
import sqlalchemy as sa
|
|
Lubomír Sedlář |
59889e |
|
|
Lubomír Sedlář |
59889e |
|
|
Lubomír Sedlář |
59889e |
def upgrade():
|
|
Lubomír Sedlář |
59889e |
''' Add the _reactions column to table issue_comments.
|
|
Lubomír Sedlář |
59889e |
'''
|
|
Lubomír Sedlář |
59889e |
op.add_column(
|
|
Lubomír Sedlář |
59889e |
'issue_comments',
|
|
Lubomír Sedlář |
59889e |
sa.Column('_reactions', sa.Text, nullable=True)
|
|
Lubomír Sedlář |
59889e |
)
|
|
Lubomír Sedlář |
59889e |
|
|
Lubomír Sedlář |
59889e |
|
|
Lubomír Sedlář |
59889e |
def downgrade():
|
|
Lubomír Sedlář |
59889e |
''' Remove the column _reactions from table issue_comments.
|
|
Lubomír Sedlář |
59889e |
'''
|
|
Lubomír Sedlář |
59889e |
op.drop_column('issue_comments', '_reactions')
|